Bug 144581 - [CSS Grid Layout] min-content row does not always shrink
Summary: [CSS Grid Layout] min-content row does not always shrink
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
Depends on:
Reported: 2015-05-04 09:42 PDT by Javier Fernandez
Modified: 2015-11-02 01:03 PST (History)
9 users (show)

See Also:

Patch (10.43 KB, patch)
2015-10-29 03:22 PDT, Sergio Villar Senin
zalan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Fernandez 2015-05-04 09:42:14 PDT
Example URL:

Steps to reproduce the problem:
1. Visit the given URL
2. Click "Make 250px wide". Notice that since the width is now smaller, the text flows down further and makes the grid row taller.
3. Click "Make 500px wide", which restores the original width. Notice the grid height does not shrink back down to min-content: it stays the same height.
4. Click "Force reflow", which detaches then reinserts the grid to the DOM. It restores the correct height.

What is the expected behavior?
The grid should look the same on startup and after clicking both "Make 250px wide" and "Make 500px wide". Instead, it is too tall.

What went wrong?
After setting the width back to 500px, the grid should shrink the height back to min-content. Instead it stays the same height.
Comment 1 Sergio Villar Senin 2015-10-29 03:22:02 PDT
Created attachment 264309 [details]
Comment 2 Sergio Villar Senin 2015-11-02 01:03:48 PST
Committed r191879: <http://trac.webkit.org/changeset/191879>