W3C home > Mailing lists > Public > www-style@w3.org > August 2004

[CSS21] Appendix G intro misleads

From: Etan Wexler <ewexler@stickdog.com>
Date: Thu, 5 Aug 2004 15:20:10 -0700
To: www-style@w3.org
Message-Id: <9D0CAABC-E72D-11D8-AD43-000502CB1B77@stickdog.com>

The introduction to Appendix G of the CSS 2.1 Candidate Recommendation 

> In addition, the document language may impose restrictions, e.g. HTML 
> imposes restrictions on the possible values of the "class" attribute.

This is misleading, if not false. When the statement appears, the topic 
at hand is the syntax of CSS level 2.1. No document language can impose 
restrictions on the syntax of free-standing CSS. (Embedded CSS is 
different.) HTML imposes restrictions on HTML documents, not on CSS.

A careful reading of the introduction would note that the example used 
is the "class" attribute, part of HTML; not selectors, part of CSS. But 
why then  does the beginning of the statement imply that HTML imposes 
restrictions on CSS? It is instead a matter of what a valid document is 
and what CSS can match through selectors.

Take an example. The selector {div.no\20luck} is legal CSS even when 
used with HTML. It simply won't match anything (because spaces in an 
HTML "class" attribute are, by definition, delimiters and not part of 
class names).

Etan Wexler.
“And outside it’s all production. It’s all illusion, set scenery.” 
—Fugazi, “Epic Problem”, The Argument
Received on Thursday, 5 August 2004 18:21:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:14 UTC