Closed Bug 1350855 Opened 7 years ago Closed 7 years ago

[css-grid] CSS Grid Layout misbehaves with a min-height container

Categories

(Core :: Layout, defect)

52 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1346699

People

(Reporter: david, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

Attached image actual.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170316213829

Steps to reproduce:

https://codepen.io/anon/pen/vxWMGJ

<style>
section  {
	min-height: 100vh;
	display: grid;
	grid-template-rows: auto auto 1fr auto;
}
</style>
<section>
 <article style='background:red'>AAA</article>
 <article style='background:green'>BBB</article>
 <article class="expand" style='background:blue'>CCC</article>
 <article style='background:orange'>DDD</article>
</section>



Actual results:

The third article has its intrinsic height, while the three others fill the remaining space.
The spec example https://www.w3.org/TR/css3-grid-layout/#adapting-to-available-space seems to imply this should work.
If you do height rather than min-height on the container it works. So there probably is something wrong with min-height.


Expected results:

the three other articles have their intrinsic heights, while the third one fills the remaining space. 
It works in Chrome. The spec example https://www.w3.org/TR/css3-grid-layout/#adapting-to-available-space seems to imply this should work.
If you do height rather than min-height on the container it works. So there probably is something wrong with min-height.
Attached image expected.png
I can reproduce this issue on my machine  	Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0

I have concluded that this issue has been around for some time now after running a mozregression.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Core & HTML
Ever confirmed: true
Component: DOM: Core & HTML → Layout
Thanks for your bug report.  This was fixed some time ago in bug 1346699
and the fix will be released in Firefox 53 (in a matter of days I believe).

david, pre-release builds are available if you want to verify:
https://www.mozilla.org/en-US/firefox/channel/desktop/
Status: NEW → RESOLVED
Closed: 7 years ago
Keywords: testcase
OS: Unspecified → All
Hardware: Unspecified → All
Resolution: --- → DUPLICATE
Summary: CSS Grid Layout misbehaves with a min-height container → [css-grid] CSS Grid Layout misbehaves with a min-height container
(FTR, I did verify that backing out the fix for bug 1346699 locally in
my beta tree did break this testcase again.)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: