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

Jens points out that Section 4.1.5 says "A CSS user agent that encounters  
an unrecognized at-rule must ignore the whole of the at-rule and continue  
parsing after it." I have to agree with Christian and Jukka on the lack of  
precision here. In the case I have raised in this thread:-

@media { ... }

there could be said to be a recognised at-rule (i.e. a valid at-keyword)  
but not a valid at-rule.

I'd like to see the following three actions:-

1) A rewording of CSS2.1 Section 4.1.5 to address this point so that it is  
clear that the error behaviour of the above case is to ignore the entire  
rule, i.e. apply it to no media types. It should also be made clear that  
this error behaviour applies if a single (apparent) media type is  
unrecognised [or, indeed, all of several], e.g.

@media printt { ... }

or is invalid (to give a CSS3 Media Queries example):-

@media screen (device-width < 640px) { ... }

Practically, this will cover typos and also (future) misunderstandings by  
authors of media queries. The reworded material might better be  
transferred to Section 4.2. I think the original case of a completely  
missing media type is the most important since it more probably might be  
construed that the rule should then be applied to all media.

2) An addition to CSS2.1 Section 7.2.1 to repeat what the formal grammar  
at Appendix G says: that at least one media type must be present (for the  
benefit of developers who are unlikely to read and understand the  
Appendix).

3) Corresponding changes to the appropriate CSS3 modules.

I would like to be sure that this issue is accepted by the editors of  
CSS2.1 and CSS3 and will be closed out in due course. I'm assuming that  
that's the function of this list and consistent with W3C's methods for  
developing Recommendations. Can one of the editors acknowledge please?

-- 
Jim Wilkinson


Opera e-mail client: http://www.opera.com/m2/

Received on Saturday, 9 October 2004 11:31:14 UTC