[csswg-drafts] [mediaqueries-5] Allow `@custom-media` inside `@supports` or add `@custom-supports` (#6611)

argyleink has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-5] Allow `@custom-media` inside `@supports` or add `@custom-supports` ==
https://drafts.csswg.org/mediaqueries-5/#at-ruledef-custom-media

Consider the following styles where it feels wrong to use a custom-media inside supports right?

```css
@custom-media --motionOK (prefers-reduced-motion: no-preference);
@custom-media --scrollTimeline (animation-timeline: works);

@media (--motionOK) { ... }
@supports (--scrollTimeline) { ... }
```

<br>

adding `@custom-supports` to the spec would allow proper type checking? making this the example instead:

```css
@custom-media --motionOK (prefers-reduced-motion: no-preference);
@custom-supports --scrollTimeline (animation-timeline: works);

@media (--motionOK) { ... }
@supports (--scrollTimeline) { ... }
```

thoughts?

I very much love using `@custom-media` btw, very rad.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6611 using your GitHub account


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

Received on Wednesday, 15 September 2021 16:29:08 UTC