w3c / w3c/csswg-drafts

[mediaqueries] `min-` or `max-` prefixed `<mf-name>` in `<mf-range>`

Open
#8,044 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Closed Accepted as Obvious Bugfix mediaqueries-4 Needs Edits
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

What should be the behavior when evaluating a min- or max- prefixed <mf-name> in <mf-range>?

Attempting to evaluate a min/max prefixed media feature in a boolean context is invalid and a syntax error.

Should it be in a boolean or range context? But please also note that this sentence seems to mix the concept of parsing (syntax error) and evaluating (cf. https://github.com/w3c/csswg-drafts/issues/8056), and that later in the spec (in an example in 3.2 Error Handling), min-orientation is said to be considered an unknown media feature.

Also, the expected evaluation is not clear for discrete media feature names. The above sentence seems to conflict with the sentence that comes just before:

“Discrete” type properties do not accept “min-” or “max-” prefixes. Adding such a prefix to a “discrete” type media feature simply results in an unknown feature name.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the mediaqueries specification text around the quoted min-/max- rules and section 3.2, Error Handling. Compare the parsing-versus-evaluation distinction raised in CSSWG issue 8056, then make the relevant wording and examples consistent for range and discrete media features.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.