Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Loirooriol opened this issue Feb 4, 2019 · 2 comments


Copy link

commented Feb 4, 2019


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 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.


This comment has been minimized.

Copy link
Collaborator Author

commented Mar 18, 2019

In I have fixed Blink to behave like Firefox.

fantasai added a commit that referenced this issue Jun 7, 2019

[css-grid-1] Clarify cases where the minimum contribution derives fro…
…m the minimum size rather than the min-content contribution. #3612

This comment has been minimized.

Copy link

commented Jun 7, 2019

OK, clarified the spec by saying "behaves as auto or depends on the size of its containing block in the relevant axis". (Also did some editorial restructuring to make it easier to read.) See

@MatsPalmgren I'd appreciate your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.