Tuesday, February 15, 2011

"Nested" CSS

I really don't know why this hasn't been implemented but it surely seems simple and would have a HUGE impact on the CSS coders everywhere.

So instead of doing this...
.selector .subselector{property:attribute;}
.selector .anothersubselector{property:attribute;}

Why not this?

Pure. Simple. And it will increase CSS readability and cut down of file size because you wont have to repeat the lead selector 100 times...


  1. Good idea. Btw, this looks a lot like the syntax used for nested objects paths in ExoWeb.

    For example:
    Student.FirstName, Student.LastName

    Student {FirstName, LastName}