W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2005

[whatwg] [html5] html:style parsing

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 31 Oct 2005 13:17:15 +1100
Message-ID: <43657EAB.7020306@lachy.id.au>
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/
Received on Sunday, 30 October 2005 18:17:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:43 UTC