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

Why flex-1 factor has a flex-basis attribute and other factors don't ? #87

Open
alemarre opened this issue Mar 22, 2016 · 6 comments
Open

Comments

@alemarre
Copy link

Hello,

I just spent some time wondering why my different flex boxes with a flex-2 class weren't of the same height in a vertical layout (height was varying depending on the content).
I had another working example with boxes using flex class with "fixed" heights.

I found on the net that the grow attribute was related to a flex-basis factor, and to assure elements to be the exact same height/width, this flex-basis attribute had to be 0.
Then I noticed that this factor was set to ~0 only on the flex-1class.

Is this behavior has been developed in a purpose ?

Thanks for your help

@timeu
Copy link

timeu commented Apr 4, 2016

This might be related to IE10 compatibility: Polymer/polymer#1097
But the rendering is somewhat buggy when using vertical layout.

@notwaldorf
Copy link
Contributor

Oof, we should investigate if this is still needed. It was originally there because IE10's flexbox is really messed up, and needs the weird flex basis; I think we should either add it to all the flex factors, or remove it from flex-1, but some consistency is needed.

@notwaldorf notwaldorf added this to the 2.0 milestone Jun 29, 2016
@freshp86
Copy link

cc/ @danbeam @mgiuffrida

Same question for the "flex" class. Pasting from https://bugs.chromium.org/p/chromium/issues/detail?id=635633#c11

In iron-flex-layout.html the "flex" class simply specifies "flex: 1", see here. On the other hand, in the new iron-flex-layout-classes.html the "flex" class also specifies an odd flex-basis value of 0.000000001px, which breaks some of our UIs, see here.

@notwaldorf: Is there a reason for the flex-basis to exist? This is effectively blocking the transition from the deprecated iron-flex-layout.html to iron-flex-layout-classes.html for Chrome.

@notwaldorf
Copy link
Contributor

TBH, I think it was an IE10 quirk. I think we can definitely fix this in the 2.0-preview branch, but I have soooome IE10 worries about fixing it on master. :/

@notwaldorf
Copy link
Contributor

(but if we can test that changing that flex basis doesn't break the tests in IE10, that's probably sufficient)

@mgiuffrida
Copy link
Contributor

@notwaldorf could we get away with using the weird basis value only with -ms prefixes? Or maybe -ms-flex-preferred-size could have the same effect as flex-basis (can't find documentation for it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants