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

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