w3c / w3c/csswg-drafts

[mediaqueries] Merge error handling section into evaluating section

Open
#7,595 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

mediaqueries-4 mediaqueries-5 Needs Edits
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

At this point, it's not clear what the motivation to have https://andreubotella.com/csswg-auto-build/mediaqueries-4/#error-handling as a separate section to https://andreubotella.com/csswg-auto-build/mediaqueries-4/#evaluating is.

The current split leads to some ambiguities in places:

An unknown <media-type> must be treated as not matching.

What does "not matching" mean, given "a media query is a logical expression that is either true or false"? (This also runs into #7594 given we don't define how to evaluate <media-type>.)

An unknown <mf-name> or <mf-value>, or a feature value which does not matches the value syntax for that media feature, results in the value “unknown”.

Results in the value "unknown" for what? Does it make the <media-feature> unknown, or the closest parent <media-condition> unknown, or does it make the whole <media-query> unknown? Implementations currently differ here!

A <media-query> whose value is “unknown” must be replaced with not all.

But, as above, a media query is either true or false? What does it mean to "replace" a <media-query>?

It seems like we may well want to define the rewriting to not all in Serializing Media Queries instead?

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

Read the Media Queries 4 “Error Handling” and “Evaluating” sections, including the cited examples for unknown media types and features. Compare the proposed handling with CSSOM’s “Serializing Media Queries” section and issue #7594; done means the relevant behavior and terminology are defined consistently, including where rewriting to not all belongs.

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
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.