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

Re: [csswg-drafts] [css-grid-1] Distribution of intrinsic sizes according to flex factors doesn't handle sum < 1 (#6078)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Tue, 06 Jul 2021 14:57:08 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-874834329-1625583426-sysbot+gh@w3.org>
Just some math, in case someone finds it useful.
When distributing among `n` tracks, the `i`-th one gets this fraction of the space:

 - If no flex tracks (equal distribution): `1 / n`
 - If `s ≥ 1`: `fⁱ / s`
 - If `0 ≤ s < 1`: `fⁱ + (1-s)/n`

where `fⁱ` is the flex fraction of the`i`-th track, and `s = ∑fⁱ` is the sum of flex fractions.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 6 July 2021 14:57:10 UTC

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