Bert Bos | CSS, une petite selection
Originally we didn't intent CSS to be very big. It was to be a simple language that just about everybody could learn, that delivered good typography, but not necessarily complex layouts.
The current level 2 is close in size to what CSS was supposed to be. That was still much too big for the browsers around 1996, so we split it in two levels.
But in 1998 we had to leave things out of level 2, too. E.g., we replaced template-based grid layout (see css3-layout) by absolute positioning, left out vertical text and some properties related to pagination and books, and decided to postpone the handling of mathematics.
At the same time the implementers and users wanted more (although at a slower speed) and so we decided to take it slowly until 2000 and then add a level 3.
CSS became very popular and professional users wanted us to extend it, rather than design a complementary language. (We did make XSLT and XSL-FO, and they are very successful with book publishers, but not with Web designers.) And so CSS level 3 soon became so big that we couldn't write it all in one specification. It would be too big and take too long.
So we decided to split CSS in modules. Eventually the whole of CSS should be defined by modules and the old level 1 and level 2 specifications will be obsolete, because all of their features are described in some module of level 3.
After some modules were finished, we found that people wanted their features to be extended even more, and we decided that it was best to add a level 4, so that we didn't have to make even more modules, but could keep the same name. Thus, e.g., we have started a Backgrounds & Borders level 4 and a Selectors level 4.
But there are very many modules and in the Working Group we keep splitting and rearranging modules whenever some features take more times than others. Modules are primarily for the benefit of the Working Group itself. They are difficult to explain to users.
We decided that users needed something easier. We don't really have the resources to do much for authors (we hope other people will write documentation for them, e.g., on W3C's new WebPlatform.org), but we can do something for one class of users, viz., implementers. We decided to publish a “Snapshot” every once in a while to document the features that were ready to be implemented.
In principle, implementers can implement everything that is a Recommendation or a Candidate Recommendation, but for extra safety our snapshot includes only Candidate Recommendations with which we already had some experience, so that we know they are really stable.
So far we published two snapshots. Their names aren't very attractive, we know. We just called them after the years we wrote them: 2007 and 2010. Maybe we'll come up with something more catchy for the next one…
The 2010 snapshot differs from the 2007 one only by the inclusion of the Media Queries specification. Of the many drafts we published between 2007 and 2010, only that one was stable enough to be added.
The next snapshot may include one or more of the new Values and Units, Backgrounds and Borders, Multi-column, Image Values and Speech, depending on how we evaluate their stability. We haven't decided that yet.
Unfortunately, the demand for new features has been such that we have mostly been writing new, unstable modules and haven't had time to finish the stable ones. So, instead of making a snapshot for 2013 that is hardly bigger than the one for 2010, we might wait until next year…
In HTML, SVG, etc., the classes are carried by one of the attributes.
CSS has a handful of pseudo-elements, because typographically
interesting components do not always correspond exactly to an
element in the document: ::first-line
for the first
line of a paragraph, :first-letter
for the first
letter letter or letter combination, ::before
for a
piece of text that doesn't occur in the document but is implied by
the mark-up, etc.
De semantics of hyperlinks will maybe be expressed in CSS some day. Hyperlinks are on the edge of semantics and style and it is difficult in this case to keep them separate. In princip;le, the fact that something is a link is semantics, but whether to present the link as a hyperlink, a transclusion, or something else is style…
XLink and HLink have been attempts to capture the semantics in XML, so that other technologies, such as CSS, could build on it. But they haven't been very successful. Opera has proposed CSS properties ('-o-link').
':First-child' is in level 2. In level 3 we generalized the pseudo-class to select the n'th child, or the first n children, or every n'th child starting with the m'th.
More about ':nth-child()' below.
If you follow a link to somewhere in the middle of another document, then you can give the element that you jumped to a special style by means of ':target'.
Of course, you can also jump within the same document, e.g., from the table of contents to a section. Some tricks rely on jumping within a document to change the style of the document with every click, such as showing and hiding tabbed cards. (But hopefully one day we'll have ways to do such style changes directly, without the limitations of this trick.)
And if the element is narrower than the desired width of one column, there will be only one column and it will be narrower than what 'columns' specified.
In both cases it is possible that there is too much text. In
that case, extra columns are added on the right side, outside the
element's box. Whether they are visible depends on the value of
overflow
.
In practice a transition duration of less than half a second is enough. Sufficient to draw attention but not so long to slow as the user down.
UAs that do not know @supports
itself will of
course skip the whole at-rule…
cm, mm, in en pt are unfortunately no longer useful on screen media. So far there is no replacement.
The '-1em' is caught as an error when the syntax is checked and the line is simply ignored. But calc() values can only be checked for the correct type (length, number, time…). The value depends, in general, on the element it is used on, and thus no attempt is made to check it except for division by 0. (Division by zero can be checked, because it only involves numbers, never units.)
CSS has many features. “Feature” isn't a technical term, but it has to do with things that can be tested: each keyword, each kind of selector, each type of value for a property, but also syntax features such as cascading and inheritance. The set of features is still growing, we don't know yet what CSS will eventually consist of.