Skip to content

[css-contain-3] container-type syntax implies you might need multiple values #7977

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

Closed
mirisuzanne opened this issue Oct 28, 2022 · 2 comments

Comments

@mirisuzanne
Copy link
Contributor

Currently, the formal syntax for container-type is:

normal || [ size | inline-size ]

This implies you might want to use normal along side either size or inline-size. The only reason to do that would be if inline-size acted as an override to the normal behavior - in which case authors would need to re-assert normal inline-size as a way to query both styles and sizes of the container. But as far as I can tell, that's not the behavior described in the spec, or the desired behavior, or the way things work with the Chrome prototype of style queries. Instead, a container type of inline-size normal behaves the same as a container type of inline-size.

I think we should probably change the syntax to:

normal | size | inline-size

But, alternately, we could just add a note to clarify how this works.

@Loirooriol
Copy link
Contributor

@mirisuzanne
Copy link
Contributor Author

mirisuzanne commented Oct 28, 2022

ha, you're right. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants