W3C home > Mailing lists > Public > www-style@w3.org > November 2015

[css-grid] fr-unit section clarification

From: Manuel Rego Casasnovas <rego@igalia.com>
Date: Tue, 24 Nov 2015 18:16:59 +0100
To: www-style list <www-style@w3.org>
Message-ID: <56549B8B.5010109@igalia.com>

I think we should add some clarification in this section:

If you read this:
"Each column or row’s share of the free space can be computed as the
column or row’s <flex> * <free space> / <sum of all flex factors>."

And you've just one track with "0.5fr" in a 800px width grid container.
You might consider that the result should be:
	0.5 * 800 / 0.5 = 800

But this is wrong, if you go to the section:

Where you can read this:
"Let flex factor sum be the sum of the flex factors of the flexible
tracks. If this value is less than 1, set it to 1 instead."

So the good result is:
	0.5 * 800 / 1 = 400

I think it'd be nice to explain it properly in the "fr-unit section" or
at least link to "flex factor sum" from there.

Received on Tuesday, 24 November 2015 17:17:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:58 UTC