[Laszlo-dev] Fwd: specificity oddity

Benjamin Shine ben at laszlosystems.com
Wed Aug 16 18:24:41 EDT 2006


I made an example of this to test it in html, and it works in the way  
that is correct according to the spec, but annoying, in Firefox and  
Safari:

http://svn.openlaszlo.org/openlaszlo/branches/coal/test/style/html/ 
specific.html

This fun post seems to reinforce what I think, although it doesn't  
specifically address it.
http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html

On Aug 16, 2006, at 12:08 PM, Benjamin Shine wrote:

> Adam confirms that I read the spec correctly; just we're sad about  
> what the W3C rules end up meaning.
>
> Begin forwarded message:
>
>> From: Benjamin Shine <ben at laszlosystems.com>
>> Date: August 15, 2006 5:56:27 PM PDT
>>
>> According to the CSS rules of specificity, a selector of
>> #gJoeSr person
>> has specificity = 0,1,1,0, and is more specific than a selector of
>> #gJFK
>> which only has specificity 0,1,0,0.
>>
>> To get the desired results -- where the #gJFK rule wins -- I have  
>> to do this
>> #gJoeSr #gJFK
>> which has specificity 0,2,00.
>>
>> This troubles me. Intuitively I want #gJFK to be more specific  
>> than "any person who is a descendant of Joe Sr."
>>
>> Am I missing something here?
>> http://www.w3.org/TR/CSS21/cascade.html#specificity
>>
>> BTW,
>> person #gJFK
>> will have the same specificity (0,1,1,0) as
>> #gJoeSr person (0,1,1,0)
>> so according to the rules in sec 6.4.1, the order in which they're  
>> declared would matter.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20060816/e96bcd43/attachment.html


More information about the Laszlo-dev mailing list