W3C home > Mailing lists > Public > www-validator-css@w3.org > March 2007

CSS validator warnings: the (definitive?) list of warning levels

From: olivier Thereaux <ot@w3.org>
Date: Tue, 20 Mar 2007 11:12:22 +0900
Message-Id: <4C65EA21-1E42-4A85-9EDC-5885A7D5AD6B@w3.org>
To: CSS validator list <www-validator-css@w3.org>

Following an off-list discussion with Philip Taylor, I noticed that  
there was still no clear list of CSS validator warning and their  
respective level.


Those who use the validator often will probably know that there are  
three levels of warnings:

* level 0: important warnings
* level 1: normal warnings
* level 2: additional warnings


The interface of the validator lets the user choose which levels are  
displayed. Using the "more options" link/toggle gives the choice of:

* No warnings
* Most important: shows only level 0 (important) warnings
* Normal report: shows level 0 and level 1 warnings, important and  
normal
* All: shows all warnings


In the source code of the validator, there are two methods to add  
warning. Curious to know why... anyway. The two methods are  
warnings.addWarning(Warning), which has a parameter to choose a  
level, and ac.getFrame().addWarning(nameofwarning, string). The  
latter calls warnings.addWarning wih level 0, that is, always  
"important".

Those curious about what the warnings are about can look at
http://dev.w3.org/cvsweb/2002/css-validator/org/w3c/css/util/ 
Messages.properties.en
which has some human-readable text associated to each warning.

Note that I am not saying this is how things should be, this list is  
only the state of things as of today. The warnings are roughly  
organized in:

* high level: for syntax and constructs that are allowed, but  
dangerous, or deprecated values
* normal level: for constructs and values that are very likely  
mistakes (same color and background color, for instance)
* low level: for values that are legit, but potentially problematic  
for accessibility or other such criteria
* unused: I was surprised to see that quite a few warnings are  
defined, but never used at all. This should probably be fixed one way  
or another.

* high level
getframe atsc
getframe color.mixed-capitalization
getframe deprecated
getframe incompatible
getframe medialist
getFrame no-declaration
getframe noexistence-media
getframe noothermedium
getframe old_class
getframe old_id
getframe out-of-range
getframe xsl
0 style-inside-comment

* normal level
1 block-level
1 marker
1 same-colors
1 same-colors2
1 with-space

* low level
2 no-background-color
2 no-color
2 no-generic-family
2 no-padding
2 redefinition
2 relative
2 relative-absolute

* unused
UNUSED body-inside
UNUSED direction
UNUSED html-inside
UNUSED noinside
UNUSED otherprofile
UNUSED pseudo-classes
UNUSED unknown-html
UNUSED warning.notforusermedium
UNUSED withblock


Hopes this provides a useful reference, and possibly food for thought  
and discussion.
-- 
olivier
Received on Tuesday, 20 March 2007 02:12:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:19 GMT