Re: [csswg-drafts] [css-extensions] Custom container queries (#8121)

Thanks for submitting this, @romainmenke and to other for taking a look at it!

@mirisuzanne I may be misunderstanding, but I was under the impression that `var()` couldn't be used within `@container` queries for the same reasons as it can't be used within `@media` queries: that these at-rules don't live within the context of an element, while vars must be (based on this explanation from [StackOverflow](https://stackoverflow.com/a/40723269/260491) and [this blog](https://bholmes.dev/blog/alternative-to-css-variable-media-queries/#link-why-var-cant-work-in-a-media-declaration) ). Is there a specific proposal to extend the scope of vars to exist outside the context of elements? 

It was seeming for a while that the custom query issue was perhaps going to be solved by allowing [declaration of custom `env()` values](https://github.com/w3c/csswg-drafts/issues/2627), but AFAICT that is bogged down (or ["pretty much dead"](https://github.com/csstools/postcss-plugins/pull/671#issuecomment-1309433720) according to @romainmenke 🙃 ). From what I've read it seemed the core problem is that env values are typed objects, not just primitives or simple string replacements, and so there's no clear way to declare them directly in CSS?

(if that is the main blocking issue, personally I'd be fairly satisfied if I could only declare them through a JS API, or possibly restrict in-CSS declarations to be simple, single values, but I guess others found those options unsatisfying?)

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


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

Received on Monday, 5 December 2022 23:09:50 UTC