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] Clarify transfer (or non-transfer) of indefinite sizes through aspect-ratio #5306

Open
fantasai opened this issue Jul 9, 2020 · 3 comments

Comments

@fantasai
Copy link
Collaborator

fantasai commented Jul 9, 2020

Current spec specifies that definite sizes are transferred through the aspect ratio. But there are probably some cases where "indefinite" sizes need to also be transferred, e.g. replaced elements with an intrinsic size must always be able to transfer those sizes.

(Probably for non-replaced elements, such sizes shouldn't transfer, since in many cases they will require layout. This rationale should also be noted in the spec so it's clear.)

@tabatkins
Copy link
Member

This is a corner case, but yeah, it is possible to have an SVG with an intrinsic width and nothing else. In this situation, setting 'aspect-ratio: 1 / 1;' should probably transfer the intrinsic width across to become an intrinsic height as well.

@fantasai
Copy link
Collaborator Author

I wonder if we should define fixed-length intrinsic sizes of replaced elements as definite?

tabatkins added a commit that referenced this issue Jul 20, 2020
…single intrinsic dimension into a full suite of 3. #5306
@tabatkins
Copy link
Member

I'm a little scared of doing that; I don't have any example, but I suspect it might have unexpected effects on layout algorithms. The above commit at least gives us the minimal edit to solve this issue, tho.

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