On 2006-09-11, at 17:55 EDT, Adam Wolff wrote:

> While I'm working on this garBage, I'm curious if people feel strongly
> that given this:
>
>     <stylesheet>
>         a c {
>             testval: 1;
>         }
>
>         b c {
>             testval: 2;
>         }
>     </stylesheet>
>
>
>     <class name="a"/>
>     <class name="b"/>
>     <class name="c">
>         <attribute name="testprop" value="$style{ 'testval' }"/>
>     </class>
>
>     <a><b><c id="w3c"/></b></a>
>
> The value for the testprop attribute of instance w3c should be 2  
> and NOT 1.
>
> That is to say, I assume that we want a similar notion of  
> applicability (not specificity) with descendant selectors. Can  
> anyone tell me if this appears to be guaranteed in browserland?

The answer would be 2 in browserland, but not because the selector is  
more 'applicable' (or specific).

<!--
.a .c { background-color: aqua; }
.b .c { background-color: black; }
-->
</style>
<div class="a"><div class="b"><div class="c">Test</div></div></div>

is equivalent.  The second rule wins, but only because it is second.   
Swap the order and the 'less applicable' rule wins.

Remember the ' ' operator only implies containment.  It does not say  
anything about how many levels are between the two selectors.



_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to