Firefox permits whitespace between `>` and `=` on CSS media queries
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: tbjgolden, Assigned: emilio)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0
Steps to reproduce:
Create a HTML page as follows, note the space between <
and =
in the media query.
<html><head></head><body>
<style>
@media (width < = 10000px) {
body {
background: black;
}
}
</style>
</body></html>
Actual results:
The page is black - the media query was (incorrectly) considered valid
Expected results:
The page should not be black - the media query should have been ignored.
This is explicitly mentioned by the spec:
https://www.w3.org/TR/mediaqueries-4/#mq-syntax
"No whitespace is allowed between the “<” or “>” <delim-token>s and the following “=” <delim-token>, if it’s present."
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/268a8fd76e9a Don't allow whitespace between media query operator delim tokens. r=boris
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28780 for changes under testing/web-platform/tests
Comment 6•3 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Description
•