w3c / w3c/csswg-drafts

[mediaqueries-5] Turn `<media-query>` to `not all` only when produced by `<media-query-list>`

Open
#11,289 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The spec requires that an invalid <media-query> be replaced with not all. (In #7595, it was resolved to apply this at serialization time only when it is syntactically invalid.)

I have concerns about the parsing model implied by this requirement.

How is a parser supposed to recognize an input as invalid for a production, but still accept it for that production? I feel like the not all-ification should only apply when <media-query> is produced by <media-query-list>, similarly as invalid selectors are ignored when produced by <forgiving-selector-list>.

If you ever want to parse <media-query> unforgivingly in another context, you can't.

<media-query> was only produced by <media-query-list> before if() was specified. But I think could use <media-query-list> 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

Start with the Media Queries Level 5 error-handling section, the discussion in #7595, and the linked Selectors and Values specifications. Determine whether the grammar should use for the not all serialization behavior, including the newer if() context; done means the specification wording and parsing model are resolved.

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.