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-flexbox] Should clarify if aspect ratio calculations use border-box or content-box #5246

Closed
cbiesinger opened this issue Jun 19, 2020 · 4 comments

Comments

@cbiesinger
Copy link

cbiesinger commented Jun 19, 2020

E.g. here:
https://drafts.csswg.org/css-flexbox/#min-size-auto

The transferred size uses the aspect ratio, but it's not clear whether it should use the content box or border box for the calculation.

Also, here:
https://drafts.csswg.org/css-flexbox/#algo-main-item
the calculation says explicitly that the inner cross size is used, which contradicts https://drafts.csswg.org/css-sizing-4/#valdef-aspect-ratio-ratio which says that box-sizing determines whether to use content-box or border-box

@cbiesinger
Copy link
Author

cbiesinger commented Jun 19, 2020

(however, the inner is probably correct for replaced elements with an intrinsic aspect ratio, which probably (?) shouldn't use box-sizing)

cc @fantasai

tabatkins added a commit that referenced this issue Aug 4, 2020
…atio calculation, so 'aspect-ratio' text can apply instead. #5246
@fantasai
Copy link
Collaborator

fantasai commented Aug 4, 2020

@cbiesinger Checked in edits to remove the explicit mention of "inner". Do you think this is acceptable to close now?

@cbiesinger
Copy link
Author

cbiesinger commented Aug 27, 2020

Thanks, that helps. I think it would be nice if there was a link to someplace that explicitly defines which box-sizing to use though.

@fantasai
Copy link
Collaborator

fantasai commented Oct 6, 2020

@cbiesinger I think at some point when the aspect ratio spec and related terminology is more stable, we'll end up adding a lot of cross-links across all our layout specs, but at this point if I add a note pointing to sizing-4 here, I have to add one everywhere else in the spec that mentions “aspect ratio” and I think that's too many notes... If you're implementing aspect-ratio, the spec for aspect-ratio is pretty explicit about which box to use.

@fantasai fantasai closed this as completed Oct 6, 2020
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

3 participants