W3C home > Mailing lists > Public > www-validator-css@w3.org > May 2001

Re: CSS Validation

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 16 May 2001 23:48:08 +0200
To: "ole yearian" <ole_yearian@convene.com>
Cc: <www-validator-css@w3.org>
Message-ID: <amb3gtkhsesekuud51gn8mb5msfe1fv6ge@4ax.com>
* ole yearian wrote:
>I'm confused about several things in the CSS Validator.
>
>1) Whenever one of my stylesheets sets the "color" attribute for a
>selector, I get a warning that I ". . . have not set the
>background-color" attribute as well. That's by design, of course! I
>almost *never* want to set the background-color attribute, save for the
><body> selector. Why give a warning?

Consider I've chosen 'black' as my default background color. Your
stylesheet now reads like

  body { color: black }

Now back- and foreground colors are equal and I cannot read anything of
the site. To avoid such conflicts, the validator warns.

>2) The validator never states how many (if any) errors it finds. It just
>spits back a "validated version" of my stylesheet. 99% of the time, this
>is identical to the input version, save that the ouput has stripped "px"
>off my margin and padding attributes. Unless I'm hopelessly out-of-date,
>adding "px" (to indicate pixels) is better practice than just relying on
>the default!

Zero (0) has no unit, it doesn't matter if it's 0px, 0cm, 0mm, etc.
Other units aren't stripped. The "pretty printer" has a lot of bugs and
shortcomings, I don't think it's a good idea to use it's output at all.
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Wednesday, 16 May 2001 16:47:19 GMT

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