Re: Fwd: selector grammer

On Tue, 21 Jan 2003, Jonny Axelsson wrote:
>>
>> By the original grammer even the following should be valid
>> #myid#anotherid { font-size:12pt }
>> Under "5.9 ID selectors"
> 
> This one I wouldn't worry too much about. By prose CSS is aware of the 
> uniqueness of IDs, but there is nothing in CSS to prevent impossible 
> selectors like :link:visited, nor is there any need for that. It is like 
> selecting triangles with four corners. I see no philosophical or practical 
> reasons why a selector that can't return any element should be disallowed.

Indeed that example isn't even impossible -- if an element has ID
attributes from two namespaces, for instance, or if it is in a non-XML
language. Also, using the same ID twice is a quick way of increasing the
specificity.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 21 January 2003 13:20:22 UTC