The CSS Problem

Published on November 12, 2012 (ā†» February 5, 2024), filed under (RSSĀ feed).

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+.)

Toot about this?

About Me

Jens Oliver Meiert, on September 30, 2021.

Iā€™m Jens, and Iā€™m an engineering lead and author. Iā€™ve worked as a technical lead for companies like Google, Iā€™m close to W3C and WHATWG, and I write and review books for Oā€™Reilly and Frontend Dogma. I love trying things, not only in web development, but also in other areas like philosophy. Here on meiert.com I share some of my views andĀ experiences.

If you have a question or suggestion about what I write, please leave a comment (where applicable) or aĀ message.

Comments (Closed)

  1. 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 šŸ˜Š

  2. 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.

  3. 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).

  4. 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.

  5. 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.

  6. 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.