W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] The StyleSheet object (section 4.2.7)

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 30 Jul 2009 23:02:30 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0907302248380.6420@hixie.dreamhostps.com>
On Sat, 18 Jul 2009, Alex Bishop wrote:
>
> There's a few parts of the specification of the StyleSheet object defined in
> section 4.2.7 that are unclear to me.
> 
> > The location (href DOM attribute)
> > 
> > For link elements, the location must be the result of resolving the
> > URL given by the element's href content attribute, relative to the
> > element, or the empty string if that fails. For style elements, there
> > is no location.
> 
> If there is no location, does that mean the attribute is null? Should that be
> explicitly stated?

CSSOM says it must return null for embedded styles:

   http://dev.w3.org/csswg/cssom/#style-sheet-location


> > The intended destination media for style information (media DOM 
> > attribute)
> > 
> > The media must be the same as the value of the element's media content 
> > attribute.
> 
> If the element's media content attribute is omitted, what should the 
> value of the attribute be? Should it be "all" (which section 4.2.6 
> defines as the default if the media content attribute is omitted)? Null? 
> The empty string (? la DOM reflection)?

Fixed.


> In any case, the definition above seems to conflict with the definition 
> of the media attribute in the CSS Object Model specification at 
> http://dev.w3.org/csswg/cssom/#stylesheet, which requires that the 
> attribute returns a MediaList.

I've fixed the section in HTML5 to not override the CSSOM spec, but 
instead to just use the hooks defined in CSSOM (except for the "disabled 
flag", which seems to be an error -- it seems like that one should just 
be initialised by the stuff we define for alternative style sheets.)


> > The style sheet title (title DOM attribute)
> > 
> > The title must be the same as the value of the element's title content 
> > attribute, if the attribute is present and has a non-empty value. If 
> > the attribute is absent or its value is the empty string, then the 
> > style sheet does not have a title. The title is used for defining 
> > alternative style sheet sets.
> 
> Again, if there is no title, does that mean the attribute is null?

This is defined by CSSOM, but I've tried to make HTML5 clearer.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 30 July 2009 16:02:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:14 UTC