-
Notifications
You must be signed in to change notification settings - Fork 747
Closed
Labels
Closed Accepted by CSSWG ResolutionCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.TestedMemory aid - issue has WPT testsMemory aid - issue has WPT testsTracked in DoCmediaqueries-4Current WorkCurrent Work
Description
Zero and negative values for 'resolution' feature don't make any sense, and it seems all of Firefox, Chrome, and Edge already reject non-positive values for it. The spec should follow the impl and say so.
A simple testcase:
<!DOCTYPE html>
<style>
div {
width: 100px; height: 100px;
background: red;
display: inline-block;
margin: 10px;
}
@media (min-resolution: 1dpi) {
#a { background: green; }
}
@media (min-resolution: 0dpi) {
#b { background: green; }
}
@media (min-resolution: -1dpi) {
#c { background: green; }
}
</style>
<div id="a"></div>
<div id="b"></div>
<div id="c"></div>
<pre>
<script>
let rules = document.styleSheets[0].cssRules;
for (var i = 1; i < rules.length; i++) {
document.write(rules[i].media.mediaText + '\n');
}
</script>
</pre>
Metadata
Metadata
Assignees
Labels
Closed Accepted by CSSWG ResolutionCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.TestedMemory aid - issue has WPT testsMemory aid - issue has WPT testsTracked in DoCmediaqueries-4Current WorkCurrent Work