Re: [CSS21] selector's specificity issues.

Andrew Fedoniouk wrote:
>  > Why should ul>li trump li:first-child?
>
>From mathematical point of view:

You lost me.  The rule as you proposed it would give ul>li a 
specificity of 0,0,1,2.  You proposed no other changes that I saw, so 
li:first-child would have a specificity of 0,0,1,1 (as it does 
currently).  I.e. ul>li wins.  Similarly, you propose to give td+td a 
specificity of 0,0,1,2.  With no other changes, td.class gets 
0,0,1,1.  Again, td+td trumps (read: "has a higher specificity than") 
td.class, unless I completely misread your post.

If the rest of your post was trying to explain how to change your 
proposal to get them all to weigh the same, I didn't follow you.  Can 
you rephrase in such a way as to be "not difficult to understand"? 
Oh, and don't forget about the case of td+td+td (to an arbitrary 
depth) which so far as I can see would still need to have a lower 
specificity that td.class to fit with expectations and, indeed, 
current actual usage.

The only solution I can see would be to make a new specificity 
ordinal in between case c and case d in the current draft.  I still 
don't see any compelling reason to do that.  Explain again how the 
benefits outweigh the difficulties?

-- 

-Adam Kuehn

Received on Thursday, 8 July 2004 15:15:42 UTC