- From: gitspeaks via GitHub <sysbot+gh@w3.org>
- Date: Sat, 19 Apr 2025 17:34:02 +0000
- To: public-css-archive@w3.org
gitspeaks has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-sizing-3] Clarify equivalence of min-content, max-content, and fit-content on the block axis == The CSS Sizing specification [defines](https://drafts.csswg.org/css-sizing-3/#auto-box-sizes) the following: > max-content block size > The box’s “ideal” size in the block axis—usually the block size of the content after layout. > min-content block size > The minimum content size in the block axis. For block containers, tables, and inline boxes, this is equivalent to the **max-content block size**. > fit-content block size > Defined as: > `max(min-content size, min(max-content size, stretch-fit size))` When the min-content size equals the max-content size, the `stretch-fit` term has no effect, and this simplifies to: fit-content block size = min-content block size = max-content block size In Flexbox, the hypothetical cross size of a flex item is determined by performing layout as if it were an in-flow block-level box with the used main size and the given available space, treating `auto` as `fit-content`. Similarly, the Grid specification treats a grid item’s min-content contribution as an intrinsic size. Together, these imply that the `min-content`, `max-content`, and `fit-content` keywords all resolve identically for block-axis sizing in both flex and grid layouts. However, reading the spec literally, one might assume that these keywords introduce distinct block-axis sizing behaviors. In practice, though, they appear to always resolve to the same value. This redundancy may add unnecessary complexity for authors trying to understand or reason about intrinsic block sizing. Are there any real-world or edge-case scenarios where the block-axis `min-content`, `max-content`, and `fit-content` sizes differ? If not, would it improve clarity to state: > On the block axis, `min-content`, `max-content`, and `fit-content` always resolve to the same size. This clarification could help reduce confusion and avoid overthinking intrinsic block sizing in layouts. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12103 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 19 April 2025 17:34:03 UTC