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

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