-
Notifications
You must be signed in to change notification settings - Fork 718
[css-sizing-4] The priority of different minimum and maximum sizes #7461
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
Comments
Edited to scratch out parts I now think are wrong. |
Hi Dave,
Thanks! Now I understand it:) In https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum, it says:
For the case 1, if the min-content(200px) is capped by the maximum size(30px), so the auto min-size is 30px. Maybe we need to reword a little bit here? |
No, I think my first comment was wrong. You're right, the spec calls for explicit max sizes to beat auto min sizes. It appears that Blink just doesn't do that. It sets the min-width to min-intrinsic and never again checks for an explicit max-width. |
@davidsgrogan Thanks for the confirmation! I think the priority order is clear to me now :
I think I can start to work on the WPT tests for these:) |
The automatic minimum size is clamped by maximums in grid and flex layout, so I think it should be the same in the |
Uh oh!
There was an error while loading. Please reload this page.
Now, we have different kinds of minimum/maximum sizes:
The definite maximum width is 30px, the Automatic Content-based Minimum width is 200px, so the calculated width of target should be 30px, IIUC.
Tested in Chromium, WebKit and Gecko, the calculated width of target is 200px. I think we need a test for it if we have an agreement here.
The "Definite maximum width" is 30px, the "Transferred Max width" is 50px, so the width of target should be 30px.
WebKit is 50px, Chromium and Gecko is 30px. Need a WPT test for it here.
The "Transferred Max width" is 30px, and the "Automatic Content-based Minimum width" is 200px.
The behavior of the engines are consistent, all are 200px.
I do not have a strong opinion here, if the agreement is 200px, need a WPT test for it.
[1] https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum
[2] https://drafts.csswg.org/css-sizing-4/#aspect-ratio-size-transfers
The text was updated successfully, but these errors were encountered: