What's Wrong With CSS


Heh heh, Jeff, you are slowly but surely coming over to the Ruby Dark Side…


May I suggest this feature as well:

#header {
-moz-border-radius, -webkit-border-radius, border-radius: 5;


Some of this has already been said, but…

There are a few things people regularly overlook about CSS:

  1. Multiple selectors can have attributes assigned to them in the same block.
  2. To go along with 1, selectors can have attributes assigned in multiple locations in the same (or different) stylesheet files.
  3. HTML elements can have more than one class. I’ll repeat this, as this is often misunderstood. HTML elements can have more than one class. class=“there are four classes” is a class attribute with 4 different, space-separated classes. Attributes assigned to those four classes will be applied to the element with that class attribute.


Chris Eppstein, one of the Sass developers and creator of Compass, has written an excellent article on refactoring the digg.com stylesheet using Sass:


It demonstrates how an already well crafter stylesheet can be very much improved in several ways. Definitely a must-read!

Chris also has a bunch of other great articles addressing not just the how of Sass and CSS generally, but also the why:



Ok just a thought, but if it is that much of a problem couldn’t you write an app to simplify the creation of the CSS, or is that just crazy.


I think instead of switching over to Less or Sass, its high time we developers start using CSS in the right way. Its lack of knowledge on our part most of the times that causes problems.