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

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Wed, 24 May 2017 07:54:08 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-303647003-1495612447-sysbot+gh@w3.org>
As a general rule, banning zero from a `<number>` or `<dimension>` is disallowed; it's an open range <https://wiki.csswg.org/spec/limited-ranges>.  

perspective()'s special zero behavior is a worst-case thing; the behavior impls settled on is nonsensical from a numerical perspective, not to mention totally discontinuous, and we're sticking with it only because content depends on it.  If its behavior had been properly described originally, and someone had noticed it, it would have been changed in the design phase (almost certainly by specifying that there's a UA-specific minimum value).  It is never an example to look to, and cannot be used to justify more bad behavior.

The correct behavior for this case is fairly similar, in that as the value approaches 0 the size of the pixel approaches infinity.  The correct solution is thus to define that negative values are invalid, and that there's a UA-specific minimum value.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1454#issuecomment-303647003 using your GitHub account
Received on Wednesday, 24 May 2017 07:54:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC