This is a legacy document, and retained on the site in order to avoid link rot. The content is likely no longer (a) accurate, (b) representative of the views and philosophies of current site management, or (c) up to date.

CSS: Lint Differences

W3C CSS 'Validator'

The W3C tool offers a 'validated stylesheet'. While that appears convenient at first glance, you should be aware that some of your declarations may have been changed or removed, rules may have been added (1) , and any comments have been removed. To replace a well commented stylesheet with a stripped down version is not necessarily commendable. Whether the comments were simply author reminders, or served the purpose of instructing, removing them without notice to the author is rude.

Since the W3C tool allows CSS2 properties, your perfectly acceptable rules may still cause problems in browsers which support CSS1 (to some extent), but not CSS2. There were some changes from CSS1 to CSS2; the W3C tool uses the CSS2 recommendation in lieu of the CSS1 recommendation, where there is a conflict. Careful authoring can ameliorate rendering problems, so care must still be taken, even after ridding your markup of any rules which generate errors and warnings.

WDG's CSSCheck

The Web Design Group's CSSCheck uses the CSS1 recommendation as a guide for issuing errors and warnings. Because there were some changes from CSS1 to CSS2, some messages may be erroneous when taken in context with CSS2 authoring. Many properties were added with the CSS2 recommendation, and may not be recognized by CSSCheck.

What to do?

Become familiar with the properties and values which were introduced with CSS2. Then, use both of them, in sequence. Use CSSCheck first, and note the errors and warnings which apply to CSS1. Correct those, being careful to ignore errors generated due to CSS2 additions.

Then, use the W3C tool, for confirmation that the CSS2 properties -- values you have used are free from errors.

Confused? Post questions about your validated CSS to the stylesheets newsgroup . Recall, as well, that these tools are not formal validators in the SGML sense of the word, and their authors are subject to error. Your confusion might be due to such an author error, so confirm and report the error to the author.

Notes

(1) At the W3C lint , use the text area for this declaration:
* { background: none #ffffff; color: #000000 }
then examine the 'Validated Cascading Style Sheet'. Although the original declaration generated no errors or warnings … the 'Validated Cascading Style Sheet' is not the same declaration you submitted.

-

Unknown