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

[csswg-drafts] [css-grid-1] Track Sizing Algorithm question

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Tue, 03 Jul 2018 07:19:53 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-337773767-1530602392-sysbot+gh@w3.org>
tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid-1] Track Sizing Algorithm question ==
Issue copied from [original email](https://lists.w3.org/Archives/Public/www-style/2018Jul/0001.html) from **Jason.W He** (hekylinwork@gmail.com):

-------------

 
In case of following grid.

--- 65% -- | -- 35% -- |
min-content
--- 65% -- | -- 35% -- |
auto
--- 65% -- | -- 35% -- |

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

template-areas:
"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
https://codepen.io/Nness/pen/MrYMzQ?editors=1100#

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?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2873 using your GitHub account
Received on Tuesday, 3 July 2018 07:19:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 3 July 2018 07:19:55 UTC