W3C home > Mailing lists > Public > www-style@w3.org > July 2018

[css-grid-1] Track Sizing Algorithm question

From: Jason.W He <hekylinwork@gmail.com>
Date: Tue, 3 Jul 2018 09:54:33 +1200
Message-ID: <CAOpMZBbWb1DmWobFFib4pXT3wNkXA4mO15EgEqeVsDfzye9Ndg@mail.gmail.com>
To: www-style@w3.org
In case of following grid.

--- 65% -- | -- 35% -- |
--- 65% -- | -- 35% -- |
--- 65% -- | -- 35% -- |

Two column: 65%, 35%
Two row: min-content, auto

"head side"
"body side"

For row #1's track size, which it use `min-content` to define height of
that row. When calculate height, why is row #1 been calculated using items
with span of 2?

>From spec, it consider items with span of 1 first, then consider at span of
2 that do not span a track with a flexible sizing function. Which the
second row `auto` get caught.

When change second row's auto to 1fr (flexible sizing function), it now has
correct behaviour.

I have sample to reproduce this under

When increment items inside area `side`. The area `head`'s height now
resize according to `side`.

Is this logical and correct behaviour to increase size of single span item
by multiple span item?

It make sense to increase total size of multi-span grid track by item span
across multiple track. How is that logical to change size of single-span
grid track by item span across multiple track?

All the browser I have tested have exactly same result, does that means
they all according to spec and have correct behaviour?

If use flexible sizing function is the only way to get this working and it
is according to spec, then in which situation we want to use auto to have
multiple span item change single span track's height behaviour?
Received on Tuesday, 3 July 2018 06:34:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 3 July 2018 06:34:29 UTC