Skip to content

[mediaqueries-4] Confused about the Boolean value of media features #1786

@simevidas

Description

@simevidas

Section 2.4.2. Evaluating Media Features in a 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. Otherwise, it evaluates to false.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions