W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2017

[csswg-drafts] [mediaqueries] Non-positive value should be invalid for 'resolution' feature

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Tue, 23 May 2017 05:41:56 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-230592920-1495518115-sysbot+gh@w3.org>
upsuper has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries] Non-positive value should be invalid for 'resolution' feature ==
Zero and negative values for 'resolution' feature don't make any sense, and it seems all of Firefox, Chrome, and Edge already rejects non-positive values for it. The spec should follow the impl and say so.

A simple testcase:
<!DOCTYPE html>
div {
  width: 100px; height: 100px;
  background: red;
  display: inline-block;
  margin: 10px;
@media (min-resolution: 1dpi) {
  #a { background: green; }
@media (min-resolution: 0dpi) {
  #a { background: green; }
@media (min-resolution: -1dpi) {
  #a { background: green; }
<div id="a"></div>
<div id="b"></div>
<div id="c"></div>
let rules = document.styleSheets[0].cssRules;
for (var i = 1; i < rules.length; i++) {
  document.write(rules[i].media.mediaText + '\n');

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1454 using your GitHub account
Received on Tuesday, 23 May 2017 05:42:03 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:13 UTC