W3C home > Mailing lists > Public > www-validator-css@w3.org > June 2004

Re: Validator bugs/quirks/?

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 01 Jun 2004 17:32:29 +0200
To: Dave Shea <dave@mezzoblue.com>
Cc: www-validator-css@w3.org
Message-ID: <40c58dab.863640679@smtp.bjoern.hoehrmann.de>

* Dave Shea wrote:
>A few observances I've discussed with various people over the past few 
>days. It seems the CSS validator is acting oddly under certain 
>Consider the following snippet:
>p { font: bold italic large Palatino, serif }
>If you validate through textarea, it passes, but the results listing 
>reverses the order of 'bold' and 'italic'. I could potentially see this 
>as a result of parsing, but it's a bit disconcerting.

Yes, you get a normalized version of the input. If you have multiple
physical style sheets, the validator combines them to a single style
sheet, if you have a 0 length like 0px it will remove the unit, if a
property can have multiple values in any order it will pretty print
the values in a "normal" order, etc. It's probably not ideal, but it
does not seem to be critical...

>Now consider this example:
>p { font: normal italic 12pt georgia, serif; }
>Valid, but it results in an error.

Yes. I have filed a bug report for it, see 


This would in CSS 2.1 be equivalent to

  font-variant: normal;
  font-weight:  normal;
  font-style:   italic;
  font-size:    12pt;
  line-height:  normal;
  font-family:  georgia, serif;

What the Validator currently does is to check whether the first value is
a legal <'font-style'> and if it is, it assigns the value to its
internal representation for the font-style part of the font property and
then continues to look for legal values. Since it already determined the
value for font-style it will not check it again, but rather for
<'font-variant'> and <'font-weight'>. Since that fails it expects the
next value to be a <'font-size'> as it would be required by the grammar.
That fails as "italic" is not a legal <'font-weight'> and hence the
error message. See the code from line 131 to 186 in


>Next and last example, taken from 
>div { border: 1px solid c85; }
>Passes as valid, though the color value is clearly invalid.

See my earlier bug report


>More thoughts and an interesting observation: 

This is, in part, covered by


and I am glad to tell you that this is fixed (though the online version
has not been updated yet). The style sheet will now be considered valid
regardless of whether usermedium=all or no usermedium is specified. Ok,
this is not yet ideal, but I feel we are getting closer :-) I've filed
another bug report for <http://css.researchkitchen.de/validation.html>,


This might turn out to be some kind of setup problem...

Thanks for your report!
Received on Tuesday, 1 June 2004 11:33:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:40 UTC