> The result is the write-only mess that is CSS today, unusable without CSS debuggers, inaccessible to most devs and traditional graphic designers let alone laymen, yet always insufficient for innovators, seemingly perpetuated only by folks who mistake their huge effort into learning CSS with its merit (aka Stockholm syndrome).
I dunno, much as I dislike CSS and its lack of useful modularity, it's never something I'd describe as "write-only" or "unusable". The selector syntax is fairly nice and concise and the cascade of properties works as one would expect (most of the time). I doubt CSS would benefit from throwing some SGML at it, because CSS is fundamentally just a list of selector-property pairs and not a mixed-content document.
The real problem with CSS is two-fold: first, the users of CSS have turned the class= attribute of HTML into an awful ad-hoc inline styling language (with the requisite awful and nightmarish stylesheets). And second, there is a huge amount of legacy cruft because it took 20 years of evolution for us to finally figure out a sane document layout model.
The non-Turing-completeness of CSS has a very very useful attribute: given a parsed stylesheet (a styling tree where selectors are nodes and properties are leaves) it is possible to annotate an HTML document with the correct style properties in a single forward pass without backtracking! That's because everything in CSS is done strictly in accordance with document order. It's not possible for an element to change the styling applied to any elements that precede it in the document.
I dunno, much as I dislike CSS and its lack of useful modularity, it's never something I'd describe as "write-only" or "unusable". The selector syntax is fairly nice and concise and the cascade of properties works as one would expect (most of the time). I doubt CSS would benefit from throwing some SGML at it, because CSS is fundamentally just a list of selector-property pairs and not a mixed-content document.
The real problem with CSS is two-fold: first, the users of CSS have turned the class= attribute of HTML into an awful ad-hoc inline styling language (with the requisite awful and nightmarish stylesheets). And second, there is a huge amount of legacy cruft because it took 20 years of evolution for us to finally figure out a sane document layout model.
The non-Turing-completeness of CSS has a very very useful attribute: given a parsed stylesheet (a styling tree where selectors are nodes and properties are leaves) it is possible to annotate an HTML document with the correct style properties in a single forward pass without backtracking! That's because everything in CSS is done strictly in accordance with document order. It's not possible for an element to change the styling applied to any elements that precede it in the document.