You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'height' is specified. 'width' is also specified, but per our guidelines, it resolves to the upper bound of the fit-content algo, which means it pays attention to the aspect ratio, and resolves to '100px'.
The implicit 'min-width: auto', tho, needs to resolve based on the "min-intrinsic size" (again, per notes, not yet per spec), so that it can override a-r when needed to prevent overflow. This means it would resolve to '150px', leading to a 150x100 box.
This probably isn't what authors expect! Protecting against overflow in the block axis seems useful, as it will be common and hard to defend against, but overflow in the inline axis is generally rare, and often intentional when it occurs.
It's not completely clear what behavior an author would expect from that code, but it seems likely that 150px width, breaking the aspect ratio, isn't it. We could fix this by defaulting "auto" to "min-content" in the inline axis and "min-intrinsic" in the block axis.
(Remember that, in the absence of aspect-ratio, the two terms have identical behavior.)
The text was updated successfully, but these errors were encountered:
fantasai
changed the title
[css-sizing] Effect of 'aspect-ratio' on 'min-size: auto' properties should probably be axis-specific
[css-sizing] Effect of 'min-size: auto' on aspect-ratio constrained boxes should probably be axis-specific
Jun 29, 2020
Given this example (from here):
'height' is specified. 'width' is also specified, but per our guidelines, it resolves to the upper bound of the fit-content algo, which means it pays attention to the aspect ratio, and resolves to '100px'.
The implicit 'min-width: auto', tho, needs to resolve based on the "min-intrinsic size" (again, per notes, not yet per spec), so that it can override a-r when needed to prevent overflow. This means it would resolve to '150px', leading to a 150x100 box.
This probably isn't what authors expect! Protecting against overflow in the block axis seems useful, as it will be common and hard to defend against, but overflow in the inline axis is generally rare, and often intentional when it occurs.
It's not completely clear what behavior an author would expect from that code, but it seems likely that 150px width, breaking the aspect ratio, isn't it. We could fix this by defaulting "auto" to "min-content" in the inline axis and "min-intrinsic" in the block axis.
(Remember that, in the absence of aspect-ratio, the two terms have identical behavior.)
The text was updated successfully, but these errors were encountered: