W3C home > Mailing lists > Public > www-style@w3.org > September 2014

[mediaqueries][css-values] Empty string value <media-query> or not

From: Simon Pieters <simonp@opera.com>
Date: Tue, 30 Sep 2014 12:05:54 +0200
To: www-style@w3.org
Message-ID: <op.xmzvn4obidj3kv@simons-mbp>
What is the correct interpretation of this grammar:

a? | b

If a is omitted, it does not occur (or occurs zero times), but | requires  
one of them to occur, so my understanding is that the above is equivalent  
to:

a | b

http://dev.w3.org/csswg/css-values/#mult-opt
http://dev.w3.org/csswg/css-values/#comb-one

Either way, it's confusing. Please make it clearer.


This is relevant for  
http://dev.w3.org/csswg/mediaqueries-4/#typedef-media-query

In particular, consider this media query list: ","

If the empty string matches <media-query> production then there are two  
empty <media-query>s (it's not defined if it matches or not AFAICT).

If the empty string does not match <media-query> production then it's  
equivalent to "not all,not all" per the error recovery rules (this matches  
Trident/WebKit/Blink/Gecko/Presto).

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3216

If the interoperable browser behavior is intended, please remove the  
question mark.

-- 
Simon Pieters
Opera Software
Received on Tuesday, 30 September 2014 10:12:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:41 UTC