3 ms·
CSS-Tricks also has a more practical guide which has been essential for me: https://css-tricks.com/flex-grow-is-weird/ https://css-tricks.com/flex-grow-is-weird
by _bxg1 7y ago
CSS-Tricks also has a more practical guide which has been essential for me: https://css-tricks.com/flex-grow-is-weird/ https://css-tricks.com/flex-grow-is-weird/
- akira2501 7y agoOnce I started thinking about flexbox the way I thought about QT GUI's it all started to click for me. Especially flex-grow being basically equivalent to BoxLayout's "stretch" I was able to easily make responsive "GUI-like" programs very quickly. I don't even bother with justify-content anymore, elements with flex-grow combined with min-width and max-width pretty much cover all my required "layout" use cases.
- _bxg1 7y agoYep. Nearly every flex child for me is either flex-grow:0; flex-shrink:0; or flex-grow:1; flex-shrink:1; And the latter on an empty div makes a really nice "spacer"