3 ms·
I think it's a good thing to have these abstractions available, and as the article notes it's better to keep these at a high level. It's not a call to extend t
by makecheck 17y ago
I think it's a good thing to have these abstractions available, and as the article notes it's better to keep these at a high level. It's not a call to extend the CSS specification or to add support for abstractions in browsers.
I have always found it easier to avoid bugs when parsers are dealing with canonical forms. In other words, make the browser support the absolute minimum syntax required to achieve every effect in CSS. Anything that's merely "syntactic sugar" should be handled at higher levels, and then "compiled down" into raw CSS.
This restriction not only makes it easier for browsers to agree, but it means that you're only likely to find quirks in your higher-level tools: which, importantly, are outside the end user's domain. Bad tools can be replaced, or you can adjust your flow to insert post-processing steps that fix the output. You don't need as many "debugging tools" because you can simply examine the generated files to tell if something was interpreted correctly (whereas, if a browser isn't seeing things the way you think, good luck figuring that out without extra tools).
- chriseppstein 17y agoAbsolutely. Sass is a CSS generator and while it might spark ideas for how a new in-browser stylesheet syntax would work, I don't think that it ever will be that syntax for one crucial reason: an in-browser syntax has full knowledge of the DOM to which it is being applied -- and that really changes how you think about things.