material icon indicating copy to clipboard operation
material copied to clipboard

Issue with Flex and small percentages?

Open ccarpediem opened this issue 12 years ago • 2 comments

I'm not sure if I'm just not understanding how the flex box is supposed to work or if there is a bug. My understanding is if you basically have 3 columns 2 with a flex setting of 5 and the 3rd just set as flex with no value, then the column with no setting take up 90% of the space (100% - 5% - 5%). This actually works as expected if I use values of 5. However, if you use a smaller number it seems to ignore the numbers and just flex the columns with equal width.

Here is a sample using 5% and it works as I'd expect. http://plnkr.co/edit/aSWR0ZCqXoKKF7kZ5cIW?p=preview

This version only changes the 5s to 4s and it doesn't work as I'd expect http://plnkr.co/edit/YbQUbe?p=preview

ccarpediem avatar Nov 18 '14 13:11 ccarpediem

@rschmukler - any thoughts?

ThomasBurleson avatar Nov 18 '14 16:11 ThomasBurleson

@ccarpediem we only have breakpoints on the flex attributes in increments of 5. We do this to avoid having 500 style rules (flex[1]-flex[100] * 5 different layout sizes (eg. flex-phone)). If you want more specificity, we recommend writing a rule for it in your application's stylesheet (flex-basis: 4%; max-width: 4%).

rschmukler avatar Nov 18 '14 16:11 rschmukler