[whatwg] [html5] html:style parsing

Lachlan Hunt lachlan.hunt at lachy.id.au
Sun Oct 30 18:17:15 PST 2005


Ian Hickson wrote:
> On Mon, 31 Oct 2005, Lachlan Hunt wrote:
>> It says the content of nested elements should be ignored; but since it is a
>> style element itself, it's not being ignored by Mozilla.
> 
> Oh, I see the confusion. The parenthetical is being interpreted way too 
> literally. Ok, fixed.

| All child elements must be processed, according to their semantics,
| before the style element itself is evaluated.

Ok, that's a little improvement, but it should probably say "All 
[descendant] elements..."

So let me see if I get this right:

<style id="s1">
   .one { background:red }
   .two { background:lime }
   <p>
     .two { background:red }
     <style id="s2">
       .one { background:lime }
       .three { background:lime }
     </style>
   </p>
   .three { background:red }
</style>

In that case, the result passed to the style system will be equivalent to:

 From #s1:
   .one { background:red }
   .two { background:lime }
   .three { background:red }

 From #s2:
   .one { background:lime }
   .three { background:lime }

Is that correct?

-- 
Lachlan Hunt
http://lachy.id.au/




More information about the whatwg mailing list