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

Re: [csswg-drafts] [mediaqueries-4] Confused about the Boolean value of media features

From: Šime Vidas via GitHub <sysbot+gh@w3.org>
Date: Thu, 07 Sep 2017 10:42:18 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-327763156-1504780928-sysbot+gh@w3.org>
Ok, I think I’ve figured it out now. It depends on the *environment* in which the CSS is evaluated. So, for example, the `pointer` media feature accepts three values: `none`, `coarse`, and `fine`. In environments without a pointing device, both non-`none` values evaluate to `false`, and hence, `(pointer)` itself evaluates to `false`. On the other hand, in environments with any kind of pointing device, at least one of the non-`none` keywords will evaluate to `true`, and so `(pointer)` will be `true`, because it meets the “any value” requirement from the original quote above.

GitHub Notification of comment by simevidas
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1786#issuecomment-327763156 using your GitHub account
Received on Thursday, 7 September 2017 10:42:14 UTC

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