-
Notifications
You must be signed in to change notification settings - Fork 772
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
(fxFlex): zero value for Shrink xor Grow results in overflowing content when basis is px #153
Comments
According to 2016 css spec,
This means if the flex container is smaller than the flex item as is the case in example with "Actual Box A" above, then the So Without loss of generality, Looks like this issue is a bug and the code is not addressing these degenerate scenarios correctly ? I am happy to provide PR :-) |
@somombo - flexbox CSS has many known issues (see issues tab) and known flexbox bugs. The min-width settings were attempts to address those bugs. Perhaps one solution is to browser detect for IE and only use the min-width/max-width settings for those browsers.
|
I am having trouble determining which FBs specifically, are resolved by setting max/min-size equal to the basis size. @ThomasBurleson, you suggested detecting for IE, so I figured that maybe the issue at hand is one of the IE related FBs. But if you look through all the IE related FB workarounds (FB# 2-8 & 12-13) none of them say anything about setting max/min-size equal to the basis size. Here is a summary of the FB workarounds listed on Flexbugs Repo:
It appears the only FB that has anything to do with max-size and basis is FB#11, which is in fact related to Safari and not IE. In addition, KI#1 also notes that this issue has been resolved in Safari version >10. So if this is the case, my question is:
The answer may very well be 'yes, this fix needs to be supported'. In which case I think we need to explore very carefully what exactly the workaround for FB#11 is recommending, and what the side effects may be, e.g. in what scenarios applying our version of the workaround brakes compliance with the flexbox-2016 css spec |
handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
) handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes #153 Signed-off-by: Somo <somo@mombo.solutions>
…ngular#160) handle various scenarios of grow/shrink being zero: * set `min-width`/`min-height` only if `grow != 0` * set `max-width`/`max-height` only if `shink != 0` * set both min and max if both `grow == 0` AND `shink == 0` * add tests for these scenarios * remove max-width from test "should set a min-width when the shrink == 0" fixes angular#153 Signed-off-by: Somo <somo@mombo.solutions>
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Setting px basis value in fxFlex does not behave as expected when either of (but not both) shrink xor grow are set to zero.
See my plunkr examplifying this.
Here is an excerpt of the code with some Comments:
In addition, here are screenshots of what I'm getting ("Actual") using only fxFlex API, versus what I should be getting ("Expected") if I used equivalent pure-css flex.
You can see these interactively at the plunkr above. Click on the view to switch between Actual and Expected.
Note that if your screen's viewport width happens to be greater than
2000px
, then you'll need to make it smaller manually in order to see the effect shown in the screenshot below for "Box A".The text was updated successfully, but these errors were encountered: