The CSS Problem
Published on November 12, 2012 (ā» February 5, 2024), filed under Development (RSS feed for allĀ categories).
This and many other posts are also available as a pretty, well-behaved ebook: On Web Development.
CSS is growing too large while CSS 2 has not nearly been understood by authors. This non-sustainable growth is a big problem for CSS.
Whatās indicative of this problem? CSS 2 includes about 120 properties, but CSS 3 may drive this to more than 270. Then, authors make generous use of boilerplates and resets and variables (through LESS, SASS, or Closure Stylesheets), but they donāt even master selector grouping (seriously).
If I had one wish, the CSS Working Group focused only on critical features. If I had another one, the web developer community focused more on the optimal use of style sheets.
That is all I have to say about CSS these days. (Almost. I donāt publish much anymore, but if I do, I like to do it on Google+.)
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a frontend engineering leader and tech author/publisher. Iāve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, Iām a contributor to several web standards, and I write and review books for OāReilly and FrontendĀ Dogma.
I love trying things, not only in web development (and engineering management), but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (Please be critical, interpret charitably, and giveĀ feedback.)
Comments (Closed)
-
On November 13, 2012, 0:10 CET, BoltClock said:
CSS 2 includes about 120 properties
Hehā¦ and authors think at least half of those properties are new to CSS3 š
Unfortunately, I guess this is one of those āunavoidable problemsā thatās bound to plague a Web-based technology. I too wish we could give people a stronger foundation in the ābaseā CSS2, but realistically for the accelerated growth of the Web thatās simply not going to work. Plus new people are jumping on the bandwagon every day. The line is surely going to be blurred between CSS2 and CSS post-level-2 sooner or later.
I could list all the issues Iāve seen authors have with grasping CSS, but there would be too many and it would be a serious test of my patience just thinking about them! Letās just say that the [css] and [css3] questions on Stack Overflow have been somewhat of a pain to keep in check (Iām a moderator and high-tier CSS answerer on SO)ā¦
Too bad authors either donāt care for the optimal use of style sheets, or they have an extremely warped impression of the word āoptimalā (c.f. CSS Lint). In the meantime, Iāll be fighting the good fight š
-
On November 13, 2012, 0:16 CET, David Woolley said:
It is part of the natural history of standards that they start of simple and well targetted, but get bloated by the standardisation process, which tries to make them do everything.
Often, and this happened with HTML, but possibly not CSS, they start as a rejection of previous standards which have gone too far that way, but end up with the same fate. (I think HTML5 is everything that HTML 1 was trying not to be.)
Another aspect of this is that when things get too complicated, layers are put on top of them; I think that may be what is happening with LESS, etc., although Iām not sufficiently familiar with them. Often these layers end up emulating functions done a couple of layers lower down, because people have forgotten so much about what those sub-layer do.
-
On November 13, 2012, 14:29 CET, Marcos Caceres said:
I donāt see the problem. I donāt know what a āmaster selector groupingā is, nor probably do I care. If I needed to know that, then Iām sure I would have learned it (just like I should probably know how DNA works, but I donāt need to for my everyday work).
What I care about is being able to do my job with CSS. Restricting to CSS 2 doesnāt help there so it seems unhelpful to say āOMG CSS is too big and developers donāt know about obscure edge cases and inside-baseball jargonāā¦ master selector grouping, seriously?
Itās also a good thing that developers are moving to using LESS, SASS, and whatever, as it points to the evolution of the platform (while exposing the failures of old CSS).
-
On November 13, 2012, 14:50 CET, David Woolley said:
āmasterā is a verb meaning āhave (or gain) a thorough understanding ofā. selectors are essentially what makes CSS CSS, and allows one to write style sheets that follow the structure of the document without having to categorise every element explicitly.
-
On November 13, 2012, 22:08 CET, Thierry said:
This knotty problem was indeed acknowledged by Daniel Glazman, co-chairman of the W3C CSS group. They acted as the HTML WG did : building too many modules and documents, some of them being far too complex. They spent so much time releasing all these modules and documents. As they were looking for a perfect model usable in all the possible cases entcountered in any situation, they, unfortunately, rejected simple, and sometimes really trivial, solutions, since they were working for āonlyā 99% of the World Wide Web. Thatās a pity.
-
On November 14, 2012, 20:33 CET, Jens Oliver Meiert said:
Thanks David, Thierry, for your thoughts. I agree with your assessment; the situation certainly owes to the standardization process itself.
Marcos, nobody suggested to stick with CSS 2. The theory is simply that focus would benefit both the CSS WG and the community.
A general note, a good conversation started on www-style.
Read More
Maybe of interest to you,Ā too:
- Next: My Year in Cities, 2012
- Previous: On Browser Testing
- More under Development
- More from 2012
- Most popular posts
Looking for a way to comment? Comments have been disabled,Ā unfortunately.
Get a good look at web development? Try WebGlossary.infoāand The Web Development Glossary 3K. With explanations and definitions for thousands of terms of web development, web design, and related fields, building on Wikipedia as well as MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, andĀ Leanpub.