3 ms·
> nobody knows exactly how it works. That's either plain nonsense or trivially true of all css, depending on your definitions. Flexbox really isn't all that c
by Doxin 9y ago
> nobody knows exactly how it works.
That's either plain nonsense or trivially true of all css, depending on your definitions.
Flexbox really isn't all that confusing or hard, and it does more than table layouts ever did.
Separate flex-grow and flex-shrink are needed for the same reason there's a min-width and a max-width property. flex-shrink defines if the element is allowed to shrink, and how much it does when needed. flex-grow defines if the element is allowed to grow, and how much when needed. The reason they are unitless values is because they are used to calculate ratios.
I agree that there have been some dubious design decisions, but if you really need to do a table cell with a flex-flowing content you can always stick a wrapper div in the cell.
- c-smile 9y ago"flex-shrink defines if the element is allowed to shrink" Rhetorical question: Shrink from what? From defined flex-base or from defined width? What is the behavior when they are different? "you can always stick a wrapper div in the cell" Nice, tag soup forever.