Skip to content

[css-grid] Automatic minimum size clamping by grid area should transfer through aspect ratio #767

Closed
@fantasai

Description

@fantasai

I think this is an error in the clamping rule... The spec says in https://drafts.csswg.org/css-grid/#min-size-auto

However, if the grid item spans only grid tracks that have a fixed max track sizing function, its automatic minimum size in that dimension is further clamped to less than or equal to the size necessary to fit its margin box within the resulting grid area (flooring at zero).

I think that if the transferred size (this dimension's size transferred through the aspect ratio to the other dimension) is controlling the size in the other dimension, then that transferred size should also get clamped accordingly.

Possible edits for this would be

However, if the grid item spans only grid tracks that have a fixed max track sizing function, its automatic minimum size in that dimension is further limited by treating the item’s fill-available fit into the sum of those track sizes as an additional maximum limit (floored at zero) for clamping the “specified size” and “content size” in that dimension and accordingly the “transferred size”, if any, in the other dimension, so as to prevent the automatic minimum from forcing overflow of its fixed-size grid area.

Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions