W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-sizing][css-grid] Definite/indefinite size in positioned/floated grid containers

From: Manuel Rego Casasnovas <rego@igalia.com>
Date: Thu, 21 Apr 2016 09:44:23 +0200
To: www-style@w3.org
Message-ID: <571884D7.7040203@igalia.com>
On 21/04/16 01:55, fantasai wrote:
> Hm, so the expected behavior is that the indefinite size is
> calculated based on 'auto' sizing the grid track, but then
> once the grid container size is resolved, the percentage
> behaves as a percentage of that resulting size?
> This makes sense to me. It seems to me (speaking personally)
> that updating the spec to have the same percentage resolution
> behavior for grid tracks as it does for block children and
> flex items would be the most reasonable thing to do here.
> Thoughts?

Note that in regular blocks the behavior for height is different
than for width.
E.g. in the following example the width is 50px but the height is 25px:
  <div style="position: absolute; font: 25px/1 Ahem;">
    <div style="width: 50%; height: 50%;">XXXX</div>

In grid layout we usually want that both axis behave the same way.
Dunno if we want that for this case or not.

> Testcase:
>   http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=4087

BTW, the item in the 3rd case "Grid (50% track size)" would have 100px
width because it has "min-width: auto;". The track would be 50px.
So, unless you specify "min-width: 0px;", the behavior would be
different than the one for blocks.

Received on Thursday, 21 April 2016 07:45:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC