-
Notifications
You must be signed in to change notification settings - Fork 194
Add Custom Media Queries #3325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Custom Media Queries #3325
Conversation
|
Can you please also generate the dist file by running |
Co-authored-by: Patrick Brosset <[email protected]>
Co-authored-by: Patrick Brosset <[email protected]>
Co-authored-by: Patrick Brosset <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR. Some suggestions to get this into a mergeable condition. Thank you!
| @@ -0,0 +1,5 @@ | |||
| name: Custom media queries | |||
| description: The `@custom-media` rule defines a named media query, which can then be reused in multiple `@media` rules. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicky suggestions to follow our guidelines around defines/sets/etc. and passive constructions. Also, I thought it would be nice to mention CSS here, like we do for other at-rules.
| description: The `@custom-media` rule defines a named media query, which can then be reused in multiple `@media` rules. | |
| description: The `@custom-media` CSS at-rule names a media query, which you can reuse in multiple `@media` rules. |
| description: The `@custom-media` rule defines a named media query, which can then be reused in multiple `@media` rules. | ||
| spec: https://www.w3.org/TR/mediaqueries-5/#custom-mq | ||
| group: media-queries | ||
| # Custom media queries are not in BCD. So, there are no BCD keys we can list here yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a comment here with predicted BCD keys would be nice. Like this:
| # Custom media queries are not in BCD. So, there are no BCD keys we can list here yet. | |
| # Not in BCD yet, but expecting something like: | |
| # - css.at-rules.custom-media | |
| # - api.CSSCustomMediaRule | |
| # - api.CSSCustomMediaRule.name | |
| # - api.CSSCustomMediaRule.query |
| @@ -0,0 +1,5 @@ | |||
| name: Custom media queries | |||
| description: The `@custom-media` rule defines a named media query, which can then be reused in multiple `@media` rules. | |||
| spec: https://www.w3.org/TR/mediaqueries-5/#custom-mq | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To pass tests:
| spec: https://www.w3.org/TR/mediaqueries-5/#custom-mq | |
| spec: https://drafts.csswg.org/mediaqueries-5/#custom-mq |
| name: Custom media queries | ||
| description: The `@custom-media` rule defines a named media query, which can then be reused in multiple `@media` rules. | ||
| spec: https://www.w3.org/TR/mediaqueries-5/#custom-mq | ||
| group: media-queries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since nobody has shipped this (yet), you need a status block, like this:
| group: media-queries | |
| group: media-queries | |
| status: | |
| baseline: false | |
| support: {} |
Spec:
Browser bugs: