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

Warnings with valid background-color

From: Matt LaPlante <mcd@cyberdogtech.com>
Date: Thu, 13 Oct 2005 12:02:46 -0400
To: <www-validator-css@w3.org>
Message-ID: <000001c5d00f$8dd4fd80$42c16640@cyberdogt42>

I get the warning:

# Line : 83 (Level : 1) You have no background-color with your color :
..style21
# Line : 91 (Level : 1) You have no background-color with your color :
..style21:visited
# Line : 98 (Level : 1) You have no background-color with your color :
..style21:hover

When down below I see the "Valid CSS information":

# .style21 {

    * background-color : transparent;
    * font-family : Geneva, Arial, Helvetica, sans-serif;
    * font-size : 12px;
    * font-weight : bold;
    * text-decoration : none;
    * color : #990099;

}
# .style21:visited {

    * background-color : transparent;
    * font-family : Geneva, Arial, Helvetica, sans-serif;
    * font-size : 12px;
    * font-weight : bold;
    * text-decoration : none;
    * color : #990099;

}
# .style21:hover {

    * background-color : transparent;
    * font-family : Geneva, Arial, Helvetica, sans-serif;
    * font-size : 12px;
    * font-weight : bold;
    * color : #9900ff;
    * text-decoration : none;

}

According to CSS 1 & 2 specs, transparent is a valid background-color
attribute, so I see no reason it should generate a warning.  I read the FAQ
regarding background-color, and I'm assuming it wants me to specify a color
rather than allow transparency.  I think this is logically flawed; obviously
if the designer has taken the trouble to specify transparency explicitly,
they intend to allow the lower level color to support the color: attribute.
Putting the pieces together, I simply don't see why consciously using valid
CSS should generate errors.

-
Matt
Received on Friday, 14 October 2005 06:13:13 GMT

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