Skip to content
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-sizing-4] How to parse "contain-intrinsic-size: 10px auto 20px;" #6391

Open
cbiesinger opened this issue Jun 16, 2021 · 4 comments
Open

Comments

@cbiesinger
Copy link

https://www.w3.org/TR/css-sizing-4/#intrinsic-size-override

The grammar allows the length and auto in any order. Therefore, the following is valid:
contain-intrinsic-size: 10px auto 20px;

However, should it be interpreted as contain-intrinsic-width: auto 10px; contain-intrinsic-height: 20px; or as contain-intrinsic-width: 10px; contain-intrinsic-height: auto 20px;?

@fantasai @tabatkins

@tabatkins
Copy link
Member

Following up: we just fixed the ordering as auto <length>, since that reflects the importance of the values and solves the parsing issue - 10px auto 20px is thus c-i-width: 10px; c-i-height: auto 20px;.

@Loirooriol
Copy link
Contributor

<length> | auto <length> could be shortened to auto? <length>

@tabatkins
Copy link
Member

It can be, yes, but we sometimes separate out clauses like this when the behavior is significantly different and we want to talk about the cases separately.

@cbiesinger
Copy link
Author

Thanks, sgtm. I implemented that in https://chromium-review.googlesource.com/c/chromium/src/+/3138514.

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

4 participants