Skip to content

[css-flexbox-1] flex-basis: max-content + aspect ratio should use aspect ratio same as flex-basis: content #4226

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
tabatkins opened this issue Aug 20, 2019 · 1 comment
Labels
Closed Rejected as Invalid Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-flexbox-1 Current Work

Comments

@tabatkins
Copy link
Member

Right now the flex base size rules have a special branch for an item with an intrinsic aspect ratio, a flex-basis of content, and a definite cross-size, to ensure that the item maintains its aspect ratio. These rules should also be invoked for other content-based sizes for the same reason.

The rule is a bit different from falling down into the generic layout case (step 3.E) because 3.E ends up invoking float sizing for such items, and the float sizing rules directly inspect the value of 'width'/'height', rather than using the more generic notion of "a definite width/height", and so they don't see that the cross size of the item has been fixed by Flexbox's special rules on when a size is definite.

@tabatkins tabatkins added the css-flexbox-1 Current Work label Aug 20, 2019
@tabatkins tabatkins added Closed Rejected as Invalid Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. labels Jun 10, 2021
@tabatkins
Copy link
Member Author

Retracting; I think this was valid before we landed a lot of tweaks/fixes to how the *-content values treat elements with aspect-ratios, but now that that should work correctly, case E will handle them correctly.

(It might even be the case now that case B could be removed? I have to recall how max-content works precisely, and whether it's different from just "transfer the cross size". Anyway, not relevant to this issue.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Rejected as Invalid Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-flexbox-1 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants