(fxFlex): zero value for Shrink xor Grow results in overflowing content when basis is px #153
Description
I initially posted this on Stack Overflow and then in the Gitter chatroom but have not gotten any responses. So I figured I'd just go ahead and file it here.
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:
<!-- Box A -->
<div fxLayout="row" >
<div fxFlex="0 1 2000px" >
<p>... Really Really long Lorem Ipsum ...</p>
<!-- expecting flex div to shrink to viewport size,
with no horizontal scrolling necessary-->
<!-- Box B -->
<div fxLayout="column" >
<div fxFlex="1 0 200px" >
<p>... Really Really long Lorem Ipsum ...</p>
<!-- expecting flex div to grow to accommodate,
content size with vertical scrolling if necessary-->
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".