Re: [csswg-drafts] [css-cascade-6] Add a `media()` function for `@import` (#10972)

> it correct that this resolution is to extend the syntax for @import so that these for example becomes valid syntax:

Yes, matching the syntax used for `if()` tests and the proposed `@when` generic-conditional rule. There's no reason to invent multiple slight variants of these syntaxes.

> Is it also correct that media types would not be allowed in media()?
> If so, does it then still solve the original issue?

Yes, media type is not allowed.

The resolution we ended up taking is that the trailing MQ *is* still allowed, so you can use a media type there if needed. Aside from that, tho, my and @frivoal's intention has always been to ensure that media features deprecate the need for media types, and at least in the case of `print` that should be sufficiently addressed by now.

> Or do we already know that the list of types is not going to change going forwards?
> With print and screen being the only ones that actually have purpose.

Correct, we consider media types to be a bad design and will not be extending the list further.

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


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

Received on Friday, 4 April 2025 14:56:13 UTC