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

[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:19:55 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-255887953-1504779586-sysbot+gh@w3.org>
simevidas has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-4] Confused about the Boolean value of media features ==
[Section 2.4.2. Evaluating Media Features in a Boolean Context](https://drafts.csswg.org/mediaqueries-4/#mq-boolean-context):

> If the feature would be true for any value other than the number `0`, a `<dimension>` with the value `0`, or the keyword `none`, the media feature evaluates to `true`.

If I understand correctly, this means that if I, for example, wanted to determine whether `(orientation)` evaluates to `true`, I would have to check if at least one of  `(orientation: portrait)` and `(orientation: landscape)` evaluates to `true`. If it does, that would meet the “any value” requirement mentioned in he quote above.

However, I’m having trouble finding the spec section that states that any keyword value other than `none` evaluates to `true`, which I assume to be the case. Could you point me in the right direction? 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1786 using your GitHub account
Received on Thursday, 7 September 2017 10:19:50 UTC

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