W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2019

[csswg-drafts] [css-grid] Do all percentages behave as auto when computing minimum contribution? (#3612)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Mon, 04 Feb 2019 21:59:25 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-406538557-1549317564-sysbot+gh@w3.org>
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid] Do all percentages behave as auto when computing minimum contribution? ==
From https://drafts.csswg.org/css-grid/#algo-single-span-items,

> The minimum contribution of an item is the outer size that would result from assuming the item’s used minimum size (min-width or min-height, whichever matches the relevant axis) as its preferred size (width or height, whichever matches the relevant axis) **if its computed preferred size behaves as auto**, or else the item’s min-content contribution otherwise.

Percentages in preferred size are resolved with respect of the grid area. The grid area is being calculated, so I guess all percentages should be considered to behave as auto?

The change was done in #2367 as an Obvious Bugfix. Well, it doesn't seem that obvious to me, because the change was against the behavior of all Blink, Firefox and Edge at that time (Firefox later adapted to the spec in https://bugzil.la/1462854). In this example, there is no longer a green background in Firefox, but there is in Blink and Edge:

<div style="width: 0px">
  <div style="display: grid; float: left; background: lime">
    <div style="min-width: 0px; width: 100%">content</div>

I just want to confirm whether my understanding of the spec is correct and whether this implication was intentional. In #2367 @MatsPalmgren said "percentages should behave as auto when the percentage basis is indefinite" like implying only some percentages were affected, but it seems to me that all of them are affected.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3612 using your GitHub account
Received on Monday, 4 February 2019 21:59:31 UTC

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