Re: [XBL2] Problems with 3.3: Loading Style Sheets

On Thu, 17 Aug 2006, Anne van Kesteren wrote:
> On Thu, 17 Aug 2006 16:47:20 -0700, Ian Hickson <ian@hixie.ch> wrote:
> > If a style _element_ is in error, it is ignored. However, having bad
> > children doesn't make it in error, it makes its children in error.
> 
> I would actually prefer having
> 
>  <style>
>   body { background:aqua }
>   <style>
>    body { background:blue }
>   </style>
>  </style>
> 
> work identical in HTML and XBL.

The <style> element in XBL has very little similarly to the element in 
HTML -- for example, it applies to shadow trees, not to the document it is 
in (modulo certain attributes), it doesn't have an entry in the CSSOM, it 
doesn't support alternate stylesheets, doesn't have a media attribute, 
etc.

The current model in XBL basically just requires the UA to find the first 
<resources> element, then walk its <style> elements. Allowing things like 
nested <style> elements, or <style> elements in places other than direct 
children of <resources>, would massively complicate the processing model.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 17 August 2006 23:55:20 UTC