standards-positions icon indicating copy to clipboard operation
standards-positions copied to clipboard

@custom-media

Open tursunova opened this issue 7 months ago • 4 comments

WebKittens

No response

Title of the proposal

@custom-media

URL to the spec

https://www.w3.org/TR/mediaqueries-5/#custom-mq

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

No response

TAG Design Review URL

No response

Mozilla standards-positions issue URL

https://github.com/mozilla/standards-positions/issues/1275

WebKit Bugzilla URL

No response

Radar URL

No response

Description

@custom-media at-rule allows developers to create named aliases for their media query conditions, making responsive stylesheets more readable and easier to maintain.

tursunova avatar Jul 23 '25 17:07 tursunova

The URL to the spec is incorrect, it should be https://www.w3.org/TR/mediaqueries-5/#custom-mq.

keithamus avatar Jul 28 '25 09:07 keithamus

The URL to the spec is incorrect, it should be https://www.w3.org/TR/mediaqueries-5/#custom-mq.

Thanks, updated.

tursunova avatar Jul 28 '25 11:07 tursunova

~~In general seems fine, but is it well defined what happens if the custom-media definition happens inside e.g. another media query? What if it happens after the custom media query has been used? Would be unfortunate having to make the stylesheet update multi-pass.~~

Sorry, should've gone in the Mozilla repo :)

emilio avatar Jul 28 '25 14:07 emilio

E.g. if a custom media query happens inside another custom media query, it is trivial to make them cyclic.

emilio avatar Jul 28 '25 14:07 emilio