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

RE: CSS Validation warning: You have no background-color with your color;

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 21 Feb 2006 14:07:02 +0200 (EET)
To: Peter Normann <peter@normann.com>
cc: www-validator-css@w3.org
Message-ID: <Pine.GSO.4.63.0602211356120.24727@korppi.cs.tut.fi>

On Tue, 21 Feb 2006, Peter Normann wrote:

> However, IMHO the presence of a transparent parameter implies that the risk
> of not specifying a color has been considered. Otherwise the background
> property would not have been set in the first place.

I'm afraid the documentation at
is not maximally usable, since the most obvious place to look for info on 
problems is the "Docs" section, which is however quite technical.
I hope a link to the FAQ can be added there. It's not very intuitive
that you need to visit the "Feedback" section to find a FAQ.

Anyway, the FAQ entry
explains the issue, though rather compactly:
"If you don't specify color and  background-color at the same level of 
specifity, your style sheet might clash with user style sheets."
Besides, it's not the whole truth. If you set background: transparent
for an element X contained in an element Y, expecting the background of Y 
to shine through, the assumption may fail because a user style sheet (or a 
browser style sheet, or another author style that will be combined with 
yours) sets background for Y. For all that you can know, the background 
color could be the same as or similar to the content color you set for X.
(Specificity is just one of the factors that affect the question which
CSS rule will be applied to an element if there is a conflict.)

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 21 February 2006 12:07:08 UTC

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