Re: Bug: Validator allows pseudo-elements on invalid places

On Wed, 2004-08-18 at 02:46, Nick Bishop wrote:
> I believe I have found a problem with the CSS
> validator at http://jigsaw.w3.org/css-validator/ which
> I believe is related to the problem discussed in a
> message dated Tue, 05 Nov 2002 03:32:51 +0100 with
> Message-ID:
> <3de02d3b.90469037@smtp.bjoern.hoehrmann.de>

This talks about pseudo-elements.

> The problem is when I submit this CSS ...
> a:visited.external { color: purple; }
> a:link.external    { color: green;  }

... but these are psuedo-classes.

>From the spec: 

        Pseudo-classes are allowed anywhere in selectors while
        pseudo-elements may only appear after the subject of the
        selector.
        
> the validator does not complain. 

... because, as far as I can tell, it is valid.

>  Like the other
> message, I find that the pretty-printer silently
> rearranges it to
> a.external:visited { color: purple; }
> a.external:link    { color: green;  }

Its perfectly alright to reorder selectors if the only impact is
stylistic. That's part of the point of "pretty print".

> The impact that it has is that the first version above
> will not work in Netscape 4.51 (and most probably
> others).

> I confess that I haven't read the specs, but I can
> confirm the second version above works with Netscape
> 4.51

I think I'll trust the spec over the interpretation of Netscape "How
badly can I emulate CSS using JSSS" 4.x.

-- 
David Dorward       <http://blog.dorward.me.uk/>   <http://dorward.me.uk/>

Received on Wednesday, 18 August 2004 07:04:34 UTC