Just give me my CSS
There's a discussion about a change to the CSS syntax to include nesting, and we can help. But it is already decided that we won't get the most desirable syntax we want, which apparently is the syntax used by Sass. This is the reason why:
Everyone wishes CSS nesting could use the same kind of simple syntax that Sass does. That’s impossible, however, because of the way browser parsing engines work. If they see a sequence likeelement:pseudo
, they’ll parse the entire style rule as if it were aproperty: value
declaration.
But we are writing new specs. We should not be limited by the current syntax that the parser of the apple browser can process (the post is published on the WebKit site, apple's browser engine). Sass is prior art. Designers/frontenders/developers know it, use it and like it. Make it easy for them. Change the software to do what the users want, not the other way around!
The fact that a browser cannot handle the Sass syntax at this moment is irrelevant. Whatever the new syntax will be, that software will have to change. And it has been proven that it is possible to parse the Sass syntax. IT IS WHAT SASS DOES. And has, for quite some time. Just look at the source code. Even more, that source code is freely available for reuse under the MIT license.
What do I prefer? I prefer simplicity. Personally, I find over time CSS has gotten more and more frustrating to use. There are so many properties and layout options, all with minute nuances that make it hard to combine them in a predictable manner. In fact, I think CSS no longer is a programming language for humans. It seems more like a machine-readable serialization format for design specifications, Only without proper design tools that know how to handle those small details and can present a convenient user interface to manipulate all of them.
The final syntax will probably be more difficult than it needs to be. So for those that need to implement large CSS based systems I suggest you stick with Sass and not worry about the code fed into the browser.
Pfff, just had to get that out of my system.</rant>