- From: Anne van Kesteren <annevk@opera.com>
- Date: Wed, 05 Aug 2009 15:14:58 +0200
- To: "Bert Bos" <bert@w3.org>, "www-style@w3.org" <www-style@w3.org>
On Mon, 03 Aug 2009 16:11:48 +0200, Bert Bos <bert@w3.org> wrote: > 1) About omitting the media query from @media: > > CSS2 allows to omit the media from @import but not from @media. That is > deliberate, because > > @import "foo" > > has an obvious meaning, while > > @media {<rules>} > > would be confusing and redundant. It would either mean the same > as "<rules>" by itself or be ignored completely. > > If at all possible, I'd like to avoid (a) changing the CSS2 > specification and (b) introducing syntax that is confusing. The reasoning for this is that <style media=""> or <link media=""> implies all as well. > 2) About how the media queries syntax hooks into CSS2 syntax: > > 2a) The easiest solution seems to be to remove the "media_query_list" > production. The text in section 3 above the grammar would then > say: "The media_query<del>_list</del> production defined below replaces > the medium production from CSS2." > > That also takes care of (1) above. > > Disadvantage: specifications (such as HTML) that also want to use media > queries, and that want a comma-separated list of them, will have to > define the syntax of the comma-separated list themselves. That seems like a bad idea to me, especially when things get more complicated, as with print, (,projection,) > 2b) Alternatively, we can rewrite the grammar in appendix G of CSS2 to > introduce a non-terminal "media_query_list." This is a bit more work, > but it can be done, because it is only editorial. The rules > for "import" and "media" would be rewritten in terms of the > new "media_query_list" non-terminal as: > > import > : IMPORT_SYM S* > [STRING|URI] S* media_query_list? ';' S* > ; > media > : MEDIA_SYM S* media_query_list LBRACE S* ruleset* '}' S* > ; > media_query_list > : medium [ COMMA S* medium]* > ; And then Media Queries is updated to replace media_query_list? That works for me. I guess if we really do not want to allow @media {} HTML5 and the <?xml-stylesheet?> specification will just have to state that the empty string is equal to all. -- Anne van Kesteren http://annevankesteren.nl/
Received on Wednesday, 5 August 2009 13:15:41 UTC