A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/6455 below:

[css-flexbox] Resolving flex item ‘auto’ preferred size for max-content contribution · Issue #6455 · w3c/csswg-drafts · GitHub

I’m trying to figure out how to resolve an auto preferred size of a flex item to calculate its max-content contribution as part of calculating the max-content intrinsic main size of a flex container.

§ 9.9.3. Flex Intrinsic Size Contributions specifies the following (emphasis mine):

The main-size max-content contribution of a flex item is the larger of its outer max-content size and outer preferred size (its width/height as appropriate) clamped by its flex base size as a maximum (if it is not growable) and/or as a minimum (if it is not shrinkable), and then further clamped by its min/max main size.

My flex item has width: auto. CSS-SIZING-3 defers to the relevant layout module to calculate this. But the main size of a flex item is determined via flex-basis and the Flexbox layout algorithm. So if flex-basis is anything else than auto (in which case it does look at width or height as appropriate), width or height seems to be effectively ignored.

How should I resolve a preferred size (width or height) of auto for a flex item? Should I follow the same steps as the steps for determining the flex base size outlined in § 9.2.3.E Determine the flex base size and hypothetical main size of each item? Where we ultimately look at the max-content size of an item if flex-basis: auto and width: auto (or height: auto)?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3