Re: [csswg-drafts] [css-contain-3][css-mediaqueries-5] Unified custom queries (#7622)

I think a large part of the use case is simply to give a name to queries.
So the feature is not being able to reuse `768px` but instead to give a name to `(width >= 768px)`

Giving it a name implies several other aspects:
- listing all the named things gives an overview of all the predefined media queries in a project
- "jump to definition" and other niceties in code editors

I think this is mostly useful for `@media` and `@container`.
I am not convinced about `@supports` needing this for the same reasons.

This isn't that convenient with `env()` because there is nothing about a custom environment variable that communicates its intended use. You can't extrapolate "this project has a breakpoint on `768px`" from a custom env variable, it might be defined for unrelated reasons.

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7622#issuecomment-2958405252 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 10 June 2025 09:41:06 UTC