New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 623504 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Compat



Sign in to add a comment

'flex-shrink: 0' disables wrapping of contents inside the flex item

Reported by kwk...@vivliostyle.com, Jun 27 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2777.0 Safari/537.36

Example URL:
http://jsbin.com/povanodeye/edit?html,css,output

Steps to reproduce the problem:
1. Open the jsbin URL

What is the expected behavior?
Text contents of flex items are wrapped and do not overflow the flex items.

What went wrong?
Text of a flex item with 'flex-shrink: 0' does not wrap and overflows the flex item.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 53.0.2777.0  Channel: canary
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0

'expected.png' is a screenshot of Firefox 50.0a1.
 
chrome.png
40.0 KB View Download
expected.png
38.4 KB View Download
Components: Blink>Layout>Flexbox
Cc: cbiesin...@chromium.org dholb...@gmail.com
Daniel, why does Firefox render this the way it does? I believe we should follow https://drafts.csswg.org/css-flexbox/#hypothetical-main-size step 3.E and and use max-content as the width here (as flex-basis computes to auto = content here)

Comment 3 by e...@chromium.org, Jun 27 2016

Labels: Needs-Feedback

Comment 4 by dholb...@gmail.com, Jun 28 2016

Firefox renders it the way it does because the spec didn't used to explicitly mention "max-content" here.  It used to just say something like "lay out the item's contents into the available space", which I interpreted as doing something more "fit-content" flavored.  (So the flex base size would end up resolving to 200px in the example testcase -- the width of the container.)

I think you're correct that Chrome's rendering matches the current spec here.  

(It does *feel* a bit broken, but as soon as you've got more than one unshrinkable flex item, the "expected" behavior (Firefox's current behavior) gets awkward/broken as well.)

Comment 5 by dholb...@gmail.com, Jun 28 2016

Microsoft Edge matches Chrome here, too.  This is just a Firefox bug. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1282821
Status: WontFix (was: Unconfirmed)
Thanks for checking!

Sign in to add a comment