W3C home > Mailing lists > Public > www-validator-css@w3.org > October 2011

Re: Rationale for the warning "Same colors for color and background-color in two contexts"?

From: Philip TAYLOR (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
Date: Tue, 04 Oct 2011 21:01:21 +0100
Message-ID: <4E8B6611.4040306@Rhul.Ac.Uk>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
CC: "www-validator-css@w3.org" <www-validator-css@w3.org>


Jukka K. Korpela wrote:

> What is the rationale for issuing the warning "Same colors for color and background-color in two contexts"? It seems that the warning is always issued, with default settings, when one rule assigns the same value to background-color as one rule assigns to color, e.g.

> a { color: black; }
> b { background: black; }

Well.  Isn't it simply the case that we are discussing
CSS, rather than CSS embedded in HTML, and therefore
the CSS validator can have no knowledge as to whether
an <a> element will be embedded in a <b> element, and
therefore seeks to warn the user that such a usage
would be ill-advised ?

	http://web-consultants.org.uk/sites/tests/colour-test.html

However, I should report that that page, when validated,
does /not/ throw up the warning that you report, at least
by default :

	http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fweb-consultants.org.uk%2Fsites%2Ftests%2Fcolour-test.html

Philip Taylor
Received on Tuesday, 4 October 2011 20:02:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:01:10 UTC