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•5 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•5 years ago
|
| Assignee | ||
Comment 3•5 years ago
|
||
Comment 6•5 years ago
|
||
| bugherder | ||
Description
•