W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: [CSS21] selector's specificity issues.

From: Adam Kuehn <akuehn@nc.rr.com>
Date: Thu, 8 Jul 2004 10:20:52 -0400
Message-Id: <p0611040abd13059d4272@[152.16.223.122]>
To: Andrew Fedoniouk <news@terrainformatica.com>, www-style@w3.org

Andrew Fedoniouk wrote:

>Algortihm described in [1] for counting style selector's specificity
>does not distinguish cases:
>
>"ul li" and "ul>li"
>
>Obviously second case is more strong/specific therefore it should have a
>bigger weight.

It is arguably more specific, but is the difference enough to make it 
worth complicating the specificity hierarchy?  Right now, specificity 
depends roughly on a) style attribute vs. element, b) IDs, c) 
classes, d) everything else.  Where in that hierarchy would you place 
this difference?  Why do you think the added complication would be 
worth the addition?

Sure, a child selector is logically more specific than a descendent 
selector.  Arguably, so is an adjacent sibling selector.  And the 
selector e[foo="bar"] is more specific than e[foo].  But is noting 
those differences worth the cost in user overhead in remembering 
those differences?

Personally, I'd say, "No."

-- 

-Adam Kuehn
Received on Thursday, 8 July 2004 10:33:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:31 GMT