Hacker News new | ask | show | jobs
by akira2501 2374 days ago
Once 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.

1 comments

Yep. 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"