W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

[csswg-drafts] [css-grid] Track sizing algorithm and gutters

From: Manuel Rego Casasnovas via GitHub <sysbot+gh@w3.org>
Date: Thu, 18 Jan 2018 11:13:34 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-289591415-1516274013-sysbot+gh@w3.org>
mrego has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid] Track sizing algorithm and gutters ==
There's some text about this in [gutters definition](https://drafts.csswg.org/css-grid/#gutters):
> For the purpose of track sizing, each gutter is treated as an extra, empty track of the specified size.

And the [track sizing algorithm](https://drafts.csswg.org/css-grid/#algo-init) has a note about gutters:
> Note: Gutters are treated as empty fixed-size tracks for the purpose of the track sizing algorithm.

But they're not mentioned in the rest of the algorithm.

I believe the text in the spec is correct, but it has lead to confusion in 2 implementations (Blink/WebKit and Firefox), so probably it can be clarified to avoid this kind of mistakes.
The problem is detailed in the following [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=802021), but basically if you have a content based grid container (e.g. a floated grid container for columns or one with `height: auto` for rows) both implementations were wrongly [calculating the size of a flexible track](https://drafts.csswg.org/css-grid/#algo-find-fr-size).
The text on the spec says:
> 1. Let leftover space be the space to fill minus the base sizes of the non-flexible grid tracks.

Implementations were subtracting non-flexible tracks, but forgetting about gutters (which should be considered non-flexible tracks too for this step.
@MatsPalmgren suggested I open this issue to try to clarify things if possible.

FWIW, Edge is right on this, and their behavior is the expected one.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2201 using your GitHub account
Received on Thursday, 18 January 2018 11:13:44 UTC

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