-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-conditional-5] Add container()
as a leaf of the @when rule
#6917
Comments
This requires that |
Yeah, @container just plain works differently from all the other conditional rules. I don't think it can be usefully merged in, unfortunately. |
I think conceptually the This would also make #6917 possible without any special container syntax. That seems to me like exactly the underlying problem that |
It doesn't seem impossible provided we have a workable solution for inner at-rules. Using
|
Right, I don't think that's a solveable problem. I'm strongly against the layer interpretation changing based on precisely what queries you use in a @when rule; that means something that should be a no-op (adding an Further, it's not just combining the known media/supports/container queries, but combining any query in the future, too - we can't predict what |
It would be nice to also see a
container()
function as a leaf of the @when rule, in addition to the already speccedmedia()
andsupports()
functions.The syntax would preferably be the same as the
@container
rule:(Perhaps the optional part should not be optional here, for performance reasons? 🤔)
Use case: it would allow stuff such as easy dark mode toggling based on the value of a custom property on a style container:
The text was updated successfully, but these errors were encountered: