W3C home > Mailing lists > Public > www-validator-css@w3.org > September 2006

Re: Anchors and Background-Color

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 25 Sep 2006 07:06:51 +0300 (EEST)
To: Justin Fortier <fortierj@cogeco.ca>
cc: www-validator-css@w3.org
Message-ID: <Pine.GSO.4.64.0609250702040.5105@mustatilhi.cs.tut.fi>

On Sun, 24 Sep 2006, Justin Fortier wrote:

> If you declare a background-color as "transparent" it will still give you the 
> following warning:
> Line : 13 (Level : 1) You have no background-color with your color : a:link

That's intentional, since transparent is not a color. If you set an 
element's background to transparent, then the element's content will 
appear on its parent element's background. This in turn is determined in 
the cascade. Think what happens if you set
   p { color: black; background: transparent; }
and the user style sheet contains
   body { color: white; background: black; }

> even though your documentation suggests that this is correct.

It's "correct" in the sense of not violating are requirement in the 
specifications, just as font-size: 1px or p { color: black; background: 
black } is. That's why the message is a warning, not an error message.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Monday, 25 September 2006 04:07:08 GMT

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