css media rule parsed incorrectly with non-required space is omitted
Reported by
trippleq...@gmail.com,
Dec 15 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12 Steps to reproduce the problem: 1. Open the attached test case 2. Note the color of the backgound. What is the expected behavior? The background should be green. What went wrong? The background is red. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 53.0.2785.116 Channel: stable OS Version: OS X 10.12.2 Flash Version: Fails in Firefox too, but works in WebKit. Definition of syntax: https://www.w3.org/TR/css3-mediaqueries/#syntax it says: media_query : [ONLY | NOT]? S* media_type S* [ AND S* expression ]* so spaces after "AND" and before an '(' expression is optional, not required. The test case is this simple code: <style> body { background-color: red; } @media screen and(min-width:42px) { body { background-color: green; } } </style> Hello world. notice the lack of space between "and" and "(".
,
Dec 16 2016
,
Dec 16 2016
Tested on mac os 10.11.6 , windows 7 and ubuntu 14.04 using chrome latest canary M57 #57.0.2952.0 and issue is reproduced. Issue is seen from M30 #30.0.1549.0 and is a non-regression issue . Marking it as Untriaged. Thanks!
,
Dec 16 2016
Gecko and Blink are correct. Without a space between "and" and "(" it will be tokenized as a <function-token> according to the core syntax and not recognized as AND.
,
Dec 16 2016
WebKit issue: https://bugs.webkit.org/show_bug.cgi?id=98303 |
||||
►
Sign in to add a comment |
||||
Comment 1 by ligim...@chromium.org
, Dec 15 2016