- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 23 Mar 2015 18:36:47 -0700
- To: Simon Sapin <simon.sapin@exyr.org>
- Cc: www-style@w3.org
- Message-ID: <20150324013647.GA9098@pescadero.dbaron.org>
On Tuesday 2015-03-24 00:42 +0100, Simon Sapin wrote: > On 23/03/15 20:54, Florian Rivoal wrote: > >Since the intention is for media types to be phased out, you should > >not run into this case too often. > > > >And when the media type is omitted, I wouldn't want to have mandatory > >parentheses, nor would I want them when the media type is followed by > >a media condition made of a single media feature (and that wouldn't > >be backwards compatible anyway). > > Iβm not suggesting requiring parentheses in any of these cases, only is > cases (the one case, really) that are ambiguous modulo precedence of 'or' > v.s. 'and'. > > > >If you think it is worth special casing the grammar for dealing with > >the limited case that remains once you've removed that, I am not > >really opposed to it. > > I donβt have a strong opinion, but since the grammar seemed to be have been > designed to avoid this kind of ambiguity, I just wanted to bring up this > corner case that might have been unintentional. I think parentheses should be required in the particular case of "[ not | only ]? <media-type> and <media-or>" but not other cases; it seems like it might be a little bit of a pain to specify and implement, but I think it probably is worth doing to avoid the ambiguity. I think it's actually not that hard to specify; it just means adding: <media-condition-without-or> = <media-not> | <media-and> | <media> | <media-in-parens> and then changing the existing production to: <media-query> = <media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]? The <media-in-parens> takes care of allowing the or-ed conditions inside of parentheses. -David [1] http://dev.w3.org/csswg/mediaqueries/#mq-syntax -- π L. David Baron http://dbaron.org/ π π’ Mozilla https://www.mozilla.org/ π Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
Received on Tuesday, 24 March 2015 01:37:15 UTC