Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have the exact opposite reaction. It's much easier to scan for and read CSS rules on their own - especially when utilizing "wordy" statements like CSS animations, font and background declarations. And for the various vendor-specific prefixes. And for comments.

Here's a real-world example formatted nicely:

  #nav .group LI A {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 4px 0px 4px 4px;
    border-top: 1px dashed hsla(0, 0%, 100.0000%, 1.0000);
    -webkit-background-clip: padding-box; /* for Safari */
    background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */	
    -webkit-transition: all 0.25s ease-in-out;
    -moz-transition: all 0.25s ease-in-out;
    -ms-transition: all 0.25s ease-in-out;
    -o-transition: all 0.25s ease-in-out;
    transition: all 0.25s ease-in-out;
  }
And as one line:

  #nav .group LI A {
    color: #fff; text-decoration: none; display: block; padding: 4px 0px 4px 4px; border-top: 1px dashed hsla(0, 0%, 100.0000%, 1.0000); -webkit-background-clip: padding-box; /* for Safari */ background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */ -webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out; -ms-transition: all 0.25s ease-in-out; -o-transition: all 0.25s ease-in-out; transition: all 0.25s ease-in-out;
  }
Let's say you need to change the border from dashed to solid. Which of these formats is easier to scan for border rules and to edit?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: