Skip to content

[mediaqueries][editorial] Ambiguity regarding calculations in media feature values #12729

@SebastianZ

Description

@SebastianZ

The current spec. text is a little unclear when it comes to calculations in media feature values.

https://drafts.csswg.org/mediaqueries-4/#:~:text=Media+features+only+accept+single+values says:

There are, however, several important differences between properties and media features:

  • Properties sometimes accept complex values, e.g., calculations that involve several other values. Media features only accept single values: one keyword, one number, etc.

While they only accept a single value, they do also allow calculations, i.e. calc(), min(), max(), etc.
Though the phrasing "calculations that involve several other values" indicates that (complex) calculations are disallowed.

So the text should be a bit clearer about that / provide a better example what's meant by a "complex value".

Plus, an example should be added showing how math functions like calc() can be used within a media feature value.

Sebastian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions