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

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

From: Daniel Holbert via GitHub <sysbot+gh@w3.org>
Date: Thu, 29 Jul 2021 20:54:55 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-889446051-1627591781-sysbot+gh@w3.org>
> Compat will probably be ok, especially if Blink and Gecko sync up shipping this change.
> [...]
> Would this cause any potential perf regressions for Gecko?

I believe Gecko is already shipping the proposed behavior -- if there's a definite flex-basis, then we treat that as making the resolved main size definite.

>  To be clear, this **will** be a change for Blink. Blink's existing behavior is intentional that the red block's percent height resolves in the original test case [above](https://github.com/w3c/csswg-drafts/issues/4311#issue-493820930), but that giving the item `height:auto` and `flex-basis:100px` would make it not resolve.

Interesting! That seems like an odd inconsistency which is nice that we can resolve here. :)  (It seems quite weird to condition on the definiteness of the specified `height` in that example, since the specified `height` is otherwise ignored for the purpose of computing the actual height [aside from indirectly influencing the resolved automatic minimum height].)

FWIW, Gecko treats the two scenarios the same (`flex-basis:100px;height:auto` and `flex-basis:auto;height:100px`), from the perspective of this issue -- we treat the flex item's final height as definite, since the flex basis is definite in both cases.  (Per the previous spec text, we technically should have been also checking if it was fully-inflexible, but that requirement didn't seem to be web-compatible.)

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 29 July 2021 20:54:57 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:47 UTC