Copyright © 2000 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This note contains comments to the XHTML group about XHTML 1.0 from the CSS working group.
The document is currently a draft. This document is not stable and should not be referenced as a normative or informative reference.
A program that renders XHTML creates a tree known as the document tree. Each node of the document tree corresponds to either a XHTML element in the source or content from the source. When the document tree is rendered, the various properties of the content must be resolved at each node in the document tree. For instance if there is some bold text in the document, then in the document tree there will be a node corresponding to the B element in the source. For each node in the document tree that is a descendant of that node, the layout engine must know to make the text bold. Therefore the properties and the semantics of the properties available to the layout engine are essential to properly rendering the document. A set of available properties and their semantics is known as a formatting model. If the formatting model is changed then the result of the layout engine could vary. If it is not desirable for many different browsers to render the same content with different results, then it is expedient to standardize the formatting model.
XHTML should describe its formatting model in a very precise manner. It should also choose a formatting model that is as close as possible to that of the major shipping browsers. Great care has been taken to ensure that the CSS formatting model can easily express as much of the formatting model of the major browsers as possible. Therefore we believe that if XHTML uses the CSS formatting model, it will be possible for multiple browsers to render a document in the same way.
The formatting model of a browser does not have to be implemented in a style sheet. The formatting model can be expressed directly in the executable code. Even in this case it should be possible to have multiple browsers render a document in the same way if they are using the same formatting model. Thus if support of style sheets is going to be optional in XHTML then a formatting model must be precisely described if multiple browsers are to render the same content in the same way. Further more it would be convenient if XHTML simply referenced the formatting model used by CSS and XSL when describing the semantics of its various elements.
It is desirable to put the style attribute in the style module and not in the legacy module. In most cases the style attribute is beneficial and user agents should be encouraged to support it.
Here are just a few of the reasons.The definition of the media attribute conflicts with CSS @media rule. The differences between the two are:
The media attribute is case sensitive in XHTML, but the CSS @media rule is case insensitive. Since it is not likely that anyone would introduce a medium called "PRINT" that is different than "print", case sensitivity is unnecessary and confusing.
XHTML users agents are required to silently ignore unknown text in the media attribute, but users agents are required to ignore the entire @media rule if there is any unknown text in the rule. By requiring the user agent to ignore the entire media attribute when it contains unknown text it is possible for the authort to specify multiple links, some of which will be completely ignored by earlier XHTML user agents; though recognized by later XHTML user agents. If the media attribute is parsed as described in the XHTML specification then all XHTML user agents will recognize all links, which does not allow the author to target later XHTML user agents with different style sheets that take advantage of new features.
We feel that the algorithm for parsing the media attribute and the @media rule should be the same.