[csswg-drafts] [css-flexbox-1] Should Flex Container Intrinsic Main Size algorithm really use _scaled_ flex shrink factor? (#6909)

davidsgrogan has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-flexbox-1] Should Flex Container Intrinsic Main Size algorithm really use _scaled_ flex shrink factor? ==
https://drafts.csswg.org/css-flexbox-1/#intrinsic-main-sizes says

* For each flex item, subtract its outer `flex base size` from its `max-content contribution size`.

This result has pixel units.

* If that result is positive, divide by its `flex grow factor` floored at 1

This result has pixel units.

* if negative, divide by its `scaled flex shrink factor` having floored the `flex shrink factor` at 1.

This result has no units because scaled flex shrink factor has pixel units. scaled flex shrink factor is equal to flex shrink factor * inner flex base size (https://drafts.csswg.org/css-flexbox-1/#scaled-flex-shrink-factor).

(`flex base size` - `max-content contribution size`) / (`inner flex base size` * max(1, `flex shrink factor`))

Numerator and denominator both have pixel units so the result is unitless.

* This is the item’s `max-content flex fraction`

So items in the same flexbox can have `max-content flex fractions` of different units. That doesn't seem right. Maybe

> if negative, divide by its `scaled flex shrink factor` having floored the `flex shrink factor` at 1.

should be the following?

> if negative, divide by its `flex shrink factor` floored at 1.

/cc @fantasai and @dholbert who appear to have developed this algorithm originally

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6909 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 23 December 2021 01:14:13 UTC