Re: [csswg-drafts] [css-grid] Dimensions unclear when clamping content-based minimum size (#3573)

I don't think it's clear either.

> The content-based minimum size for a grid item in a given dimension is [...]. if in a given dimension

Are these dimensions the same, or independent?

> and its input to the transferred size suggestion in the opposite dimension

So if I have an item with `min-width: auto` in a column sized with `100px`, it has an aspect ratio of 3:1 and `height: 50px`, then this seems to mean it should clamp the input (i.e. the height `50px`) by the max column size `100px`, which is still `50px`, then convert it through the aspect ratio, which is `150px`, and this overflows the column.

So I don't get why bother with opposite dimensions, if this is trying to prevent overflow why not just calculate (without clamping the input) the transferred size suggestion, i.e. `150px`, and then clamp by `100px`? Like

> However, to prevent the content-based minimum size from forcing overflow of its fixed-size grid area, if in the given dimension the grid item spans only grid tracks that have a fixed max track sizing function, then the content-based minimum size is clamped to less than or equal to the stretch fit into the grid area’s maximum size in that dimension

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3573#issuecomment-459559721 using your GitHub account

Received on Friday, 1 February 2019 00:26:32 UTC