Calling for a new CSS revolution
Seriously, I think the time has come for us to look at what we've done, where we are, and what remains on the TODO list. I think we made a number of mistakes regarding CSS that are annoying today, and it's highly time to list them publicly, and apologize. I can say we because I have been a member of the CSS Working Group since 1997 (or was it 1996, I don't remember), participated into CSS 2, am the editor of a few CSS 3 modules. As an official member of the CSS WG on behalf of Electricité de France first, and Netscape/AOL later, I accepted new directions or proposals for the future of CSS that seem to me historical errors today. Before saying "Daniel plays it again", please read the whole message .
- the biggest mistake we made is 6.5 years old. Back in june 1998, we should have moved CSS from levels to versions. Levels, and the backwards compatibility they imply, are now a real threat for the future of CSS, somehow blocking innovation. Furthermore, it's extremely hard to validate a CSS instance because no level information is, of course, included in CSS style sheets. It would have been incredibly simple and easy to preserve CSS 2 as a level, and make forthcoming specs become versions of the level 2 of CSS. One very visible effect of levels is when the CSS WG wants/needs to change the set of values of a property to add one, and then turns a property into a shorthand by some kind of magic trick. CSS levels are a dogma, and that dogma becomes a burden. Versions would have allowed us to move faster, releasing for instance minor versions every six months.
- in my mind, CSS 2.1 was another big mistake. Oh, don't misunderstand me, it's not a mistake because it is bad. Not at all. It's even a very good spec... But it has been sucking all resources from the CSS WG for more than four years. Instead of focusing all our energy on the future, we kept our eyes on the past. I am sorry, and I know some proeminent voices disagree with me, but I can't help but finding it useless: the CSS 2.1 will not change at all the Web landscape around us. It is not "leading the web to its full potential". I do believe we are late on CSS 3 because we spent hundreds of hours, dozens of teleconferences, and sometimes face-to-face meetings from A to Z, on CSS 2.1. Extracting from implementations the highest common denominator was a good idea, but using it to make CSS 3 instead of CSS 2.1 was even a better one. Instead of that, the CSS WG edited - and still edits - a document that contains changes that are not yet in the corresponding CSS 3 modules, and a document that CSS 3 should really obsolete as soon as it is released... If back in 1998 I did not see the need for versions in CSS (mea maxima culpa), I have always expressed the same opinion about CSS 2.1.
- we start acting like the HTML WG. I mean we have a loooooot of modules/documents on the table, some of them being incredibly complex, and we spend considerable time releasing them. More and more observers wonder where we are and what we are doing. We are Constitutionalists, wanting a perfect model usable in all-possible-cases-of-the-world, discussing the impact of the position of a comma for hours, and rejecting simple, sometimes trivial, solutions when they work for "only" 95% of the World Wide Web. That could be understood as a plea for KISS but it's not only that. It's also a plea for pragmatism, that we seem to have completely put aside. The 1st of December, during the celebration for the 10th anniversary of the W3C, the acronyms XHTML and CSS were not pronounced or shown a single time in the day. I guess it's unfortunately a good indicator of the situation. The number of possible interactions between properties and property values in the CSS spec makes it impossible to test completely. I mean that the number of tests needed to make sure interoperability is reached is so high we'll never reach real interoperability. Knowing that, and giving the fact CSS 2.1's unique goal was to build an interoperable ground based on existing implementations, I am sure we followed a partly wrong path here. We also lost momentum because we have too many documents, discuss too complex issues relying only on one person's knowledge. Because more than six years after CSS 2, our group's charter is still the same.
So I do apologize for the above. Seriously. I was unable to have an outsider's eye on the question until I moved from a Group's full member status to an Invited Expert joins-when-he-can-and-he-cannot-often status. I was also unable to impact strongly enough the decisions taken in the Group, but, hey, that's life, and I am only a frog, and it's hard to fight face-to-face some rhetorics Masters when you're not a native english speaker.
So what do Web authors need today more than ever ? What is the list of features/extensions/whatever the Group could keep its eyes on to make things go faster, MUCH faster, and DELIVER ?
- authors need a new version of CSS
- they need functional notations allowing to position an element at "21% minus 11 pixels" of the width of another one... That's just impossible to do right now and that's certainly the top request.
- they need inline-blocks
- they need to position and size elements relatively to other elements, for instance "I want this text column to have the height of that other text column", without having to insert enclosing elements above them.
- they need columns
- they need to vertically center blocks without a hack
- they need a flexing box model like XUL's
- they need to scale image backgrounds and need to apply filters to images
- they need to be sure they can print a document preserving its readability, its usability and its original spirit
- they need to be able to define constants à la #define. The Cascade does help a bit, but only a bit. It solves only a very small minority of the cases where such constants are needed.
- they need better internationalization, but that does not mean we need to solve RIGHT NOW all the cases of the world, even the ones that we know are going to take years to solve correctly.
- they need scoped stylesheets, and a part of CSS 3 Selectors.
With these twelve points, we could so drastically change presentation on the Web that it would improve user's experience by a few orders of magnitude. The list above contains stuff that is already present in some CSS 3 modules or is even already implemented in some user agents beginning with F and ending with x. From my perspective, the rest of our current work, and in particular 2.1, can hibernate.