Re: [csswg-drafts] [css-env] Adding custom env() variables (#2627)

I am also interested in having custom environment variables, exactly for use in media queries (for breakpoints and similar), where we can't use regular variables. `clamp` and similar functions are not always enough, especially when layout is different.

Are there any plans to introduce this? Solution proposed earlier seems good, and shouldn't be too hard to implement.

> I think the general idea is to allow script to set them. But it's probably a good idea to allow stylesheets specify default values to them. Probably something like
> 
> ```css
> @env {
>     --some-width: 30em;
>     --some-color: #000;
> }
> ```
> 
> works.



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


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

Received on Thursday, 16 February 2023 14:10:36 UTC