Possible CSS2/CSS2.1/CSS3 spec error in @media

[Re-post - having problems getting through]

I'm an ordinary Web developer, albeit (I would claim) with a good
knowledge of CSS and as a subscriber/contributor to Eric Meyer's CSS
Discuss. I've just subscribed to this list to report what I believe are
two errors in the CSS2 Rec and the CSS2.1 CR (this e-mail reports the
first possible error). I hope this is the correct forum. It may be that
the issue is already known.

For the @media rule it's presumably obligatory to specify one or more
values for media type. Both the CSS2 Rec and the CSS2.1 CR (25 Feb 2004)  
are
silent on this point [Sections 7.2.1, 4.1.5 and 4.2]. If you don't specify  
any
media, thus:-

@media {selector {property: value} ...}

then it's undefined whether the entire @media rule is ignored or whether  
it is
applied to all media. The desirable behaviour would be to ignore the rule
since the author presumably intended the rule to be restricted to certain
media.

The CSS2.1 CR clarifies that unknown media type names should not result in  
the
@media rule being ignored [Section 7.2.1] but that doesn't address complete
absence.

CSS3 may also be affected: the Syntax module WD doesn't appear to cover a
missing media type in its description of @media error behaviour.

For the other methods of specifying media types, the default value *is*
defined. For the <link> element it's "all"; for the <style> element it's
"screen" (surprisingly); and for @import it's "all".

--
Jim Wilkinson

Cardiff, Wales UK

Received on Wednesday, 6 October 2004 09:33:38 UTC