New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 674596 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

css media rule parsed incorrectly with non-required space is omitted

Reported by trippleq...@gmail.com, Dec 15 2016

Issue description

UserAgent: 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 "(".
 
test.html
135 bytes View Download
Labels: Needs-Bisect

Comment 2 by ajha@chromium.org, Dec 16 2016

Labels: Needs-Milestone

Comment 3 by hdodda@chromium.org, Dec 16 2016

Cc: hdodda@chromium.org
Labels: -Needs-Bisect -Needs-Milestone M-57 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
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!

Comment 4 by r...@opera.com, Dec 16 2016

Status: WontFix (was: Untriaged)
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.

Sign in to add a comment