W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2021

Re: [csswg-drafts] [css-flexbox] should a definite flex-basis always make the main size be definite? (#4311)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Tue, 10 Aug 2021 23:13:08 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-896372435-1628637187-sysbot+gh@w3.org>
All right, we've made a handful of edits here.

First, we rephrased the definition of "main size" a little, mostly for clarity, but added a line that makes it clear that the post-flexing main size is used when any layout algo is asking for the "used width" or "used height" (as appropriate). Small detail, but tied into this topic:

> The main size of a flex container or flex item refers to its width or height, whichever is in the main dimension. Its main size property is either its width or height property, whichever is in the main dimension. Likewise, its min and max main size properties are its min-width/max-width or min-height/max-height properties, whichever are in the main dimension, and determine its min/max main size.
> In flex layout, the main size is controlled by the flex property rather than directly by the main size property.
> Note: This means any references to a flex item’s used size in the main dimension (width, height, inline size, block size) refers to its post-flexing main size.

Then we addressed the main topic, ensuring that a definite flex basis is *always* treated as definite:

> * If the flex container has a definite main size, then the post-flexing main sizes of its flex items are treated as definite.
> * If a flex-item’s flex basis is definite, then its post-flexing main size is also definite.


One side-issue that showed up in this thread was some minor confusion about applying CSS2 layout definitions, which explicitly reference the 'width' or 'height' properties' computed values for certain things, when for a flex item it's intended that you pay attention to the flex-basis instead. We're not sure how to actually fix this without going in and editting CSS2 in an invasive way and making it reference flexbox. :/ Hopefully it's okay without that clarification?  (We can't just say "whenever another spec referenced the main size property, use the flex-basis instead", because things like inheritance do need to actually get the value of the 'width' or 'height' property...)

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 10 August 2021 23:13:10 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:42 UTC