W3C home > Mailing lists > Public > www-validator-css@w3.org > July 2009

Re: Little bug in a warning message

From: James Hopkins <james@idreamincode.co.uk>
Date: Thu, 23 Jul 2009 08:47:23 +0100
Message-Id: <7F973F33-F02C-4AB3-A5E7-4234107479B6@idreamincode.co.uk>
To: Narrow Code <narrow_code@yahoo.com>
Cc: "www-validator-css@w3.org" <www-validator-css@w3.org>
On 22 Jul 2009, at 09:07, Narrow Code <narrow_code@yahoo.com> wrote:

> a   {
>     color : #123456;
> }
>
> a:hover {
>    color : white;
>    background : #123456;
> }
>
>
>
> I get this warning:
>
> Same colors for color and background-color in two contexts  a:hover  
> and  a
>
> This is not true,

The warning itself is correct; the same value *is* being used for  
'background-color' and 'color' across both type and pseudo class  
declaration blocks.

Whilst it may be a false positive in your case (since you've  
subsequently specified a 'color, value other than what would be  
inherited), the validator has still flagged this as a potential  
accessibility issue, presumably since it doesn't pay attention to any  
subsequent values ('color:white' in your case) that solve the issue  
that it warns about.

> because the "color" attribute is set in "a:hover", and should not be  
> copied from  "a".
>
Received on Thursday, 23 July 2009 07:49:43 GMT

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