logoalt Hacker News

cluckindanlast Thursday at 7:33 AM4 repliesview on HN

Do not use flexbox for page layout. It invites nested flexboxes, which eats your reflow performance.

Use grid instead.


Replies

easyThrowawaylast Thursday at 8:28 AM

Not the first time I hear of this, but I thought it was a blink-specific issue when using severely nested structures (e.g., html pages written using visual editors like Elementor or Webflow)?

throwaway77385last Thursday at 8:46 AM

For quite a while, I had to keep using flexbox instead of grids, because grids killed performance, funnily enough. That seems to have been rectified with modern browsers though, funnily enough.

zwnowlast Thursday at 9:02 AM

Flexbox is great and having nested flexboxes is also great. It makes building responsive pages a bliss. Learn it if you are having trouble with it, it is really not that difficult. Grids are much more error prone and allow for much less flexibility.

show 1 reply
twstedlast Thursday at 8:00 AM

Useful insight: any sources?

show 1 reply