CSS3 suggestion

In discussion on the news:comp.infosystems.www.authoring.stylesheets
newsgroup, the W3C CSS2 'Validator', and the WDG csscheck have recently
come under scrutiny. A long time user of both these tools, I've recently
found myself adding caveats when referring to  error messages or
warnings issued by each.

Since csscheck is a CSS1 lint, it is perfectly reasonable for it to
issue an error for inclusion of a CSS2 property. However, that can be
confusing for an author not thoroughly conversant with changes/additions
from CSS1 to CSS2 (and CSS3, by logical extension).

The primary concerns I have with the W3C CSS 'Validator' (apart from the
use of the term 'validator'), won't be addressed by this suggestion, but
FYI, they are:

Warnings about 're-definition' in stylesheets which declare a
more specific rule for an identical selector declared previously.  The
recommendation is specific on the 'cascade'; why would the 'validator'
complain about an author's attempt to take advantage of the cascade?
Secondly, in the 'validated' css that the tool outputs, any such
're-definitions' are eliminated, *along* with any comments which may
have been in the css. If the intention is to 'cut and paste' corrected
CSS from the output, removal of the comments lessens the usefulness.

The suggestion:

Consider  allowing specification of the level of CSS *in* the external
CSS file, so that CSS lints could operate in much the same manner as
HTML validators which use the <!DOCTYPE...> to determine the HTML level
against which to validate. That would remove the onus of deciphering
error messages from the document author. Something like (as the first
entry in an external CSS file):

/*  url (http://www.w3.org/TR/REC-CSS1)  */

Then, it would just be a matter of convincing the lint authors to
recognize the reference, and structure their errors/warnings
accordingly. 

There might also be an author who wished to be made aware of *all*
potential errors/warnings, so...

/*  url (http://www.w3.org/TR/REC-CSS1), http://www.w3.org/TR/REC-CSS2/,
http://www.w3.org/PR/REC-CSS17/  */

might be useful, as well.

Sue Sims

Received on Sunday, 9 May 1999 18:20:10 UTC