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

Re: CSS validator report has changed

From: <rouel@essi.fr>
Date: Fri, 16 Sep 2005 11:14:27 +0200 (CEST)
Message-ID: <43612.193.51.208.132.1126862067.squirrel@webmail.essi.fr>
To: graham@nwpayroll.com
Cc: www-validator-css@w3.org

Hello,

Your stylesheet probably looks like:
.foo {
  background-color: #fff;
  color: #000;
}
.bar {
  color: #fff;
}
There is nothing that prevents an element with the class bar from being
used inside an element with the class foo.
For example, you could have an HTML containing this piece of code:
<p class="foo">
  <a class="bar">...</a>
</p>
In this case, the style "background-color: #fff; color: #fff" would apply
to the a.bar element.
The message you talk about warns you about this possible kind of problems,
even if your html document does not have this structure. This is a "be
careful" warning.

Jean-Guilhem Rouel

> Two days ago I tested a HTML page with the CSS validator and it passed
> with
> no errors. Today after making some slight amendments tested the same page
> and received 300 warnings regarding, mainly, colours. Many of the warnings
> were similar to -
>
> Line : 39 (Level : 1) Same colors for color and background-color in two
> contexts .legalbar and .faqsubheader
>
> as the two classes have no relation to each other and can't be used on the
> same item what is the point of the warning. Surely it is allowable to have
> the same foreground colour in one circumstance as a background colour in
> another circumstance.
>
> Has your validator analysed this correctly, if so, what is the purpose of
> pointing this out, especially as 2 days ago it did not.
>
> Graham Williams
>
Received on Friday, 16 September 2005 09:14:36 GMT

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