Skip to content

[mediaqueries] Improve definition of evaluating media features in boolean context #8050

@cdoublev

Description

@cdoublev

If I understand it correctly, the following is equivalent to the feature evaluates to false for any value that is the number 0, a <dimension> with the value 0, the keyword none, or a value explicitly defined by that media feature to evaluate as false in a boolean context, otherwise it evaluates to true.

If the feature would be true for any value other than the number 0, a <dimension> with the value 0, the keyword none, or a value explicitly defined by that media feature to evaluate as false in a boolean context, the media feature evaluates to true. Otherwise, it evaluates to false.

https://drafts.csswg.org/mediaqueries-5/#mq-boolean-context

I find the current wording a bit hard to read, especially to grasp the last condition, which requires to join these two parts with content in between:

  • If the feature would be true for any value other than
  • a value explicitly defined by that media feature to evaluate as false in a boolean context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions