[whatwg] The StyleSheet object (section 4.2.7)
ian at hixie.ch
Thu Jul 30 16:02:30 PDT 2009
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:
> > 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)?
> 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. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg