←back to thread

197 points OuterVale | 2 comments | | HN request time: 0.001s | source
Show context
anonymars ◴[] No.46227939[source]
I will never understand the bizarre scene of the web's smug collective declaration that tables were dead and not to be used juxtaposed against the years it took to regain the ability to reliably center things. Assuming one agrees that we even did regain it.

Related: I also love when I can't paste tabular data into Excel/etc. anymore

For the record, I don't hate the idea of stylesheets, but...sheesh

replies(11): >>46227986 #>>46228033 #>>46228508 #>>46228913 #>>46228936 #>>46228943 #>>46229276 #>>46229933 #>>46230316 #>>46230586 #>>46232156 #
xboxnolifes ◴[] No.46228508[source]
I think it was advised a bit too early, but ever since flexbox entered the scene, tables for page formatting became irrelevant.

And just in case, nobody ever said tables were dead. Tables were declared bad practice for page formatting, not for tabular data.

replies(2): >>46228655 #>>46229903 #
cluckindan ◴[] No.46228655[source]
Do not use flexbox for page layout. It invites nested flexboxes, which eats your reflow performance.

Use grid instead.

replies(4): >>46228809 #>>46228947 #>>46229054 #>>46229152 #
twsted ◴[] No.46228809[source]
Useful insight: any sources?
replies(1): >>46228953 #
dekoidal ◴[] No.46228953[source]
From 2014 https://jakearchibald.com/2014/dont-use-flexbox-for-page-lay...
replies(1): >>46229233 #
wk_end ◴[] No.46229233[source]
Browser performance tips from 2014 mean very little twelve years on. Not only have machines gotten faster and networks gotten faster, rendering engines gotten faster. And I'm doubtful it nested flexboxes would've been all that much of a problem in most cases even then.

The most important thing is to use the right tool for the job. If grid lets you express what you want in the most straightforward way, use it; if flexbox does - even if it needs nesting - then use it instead. Don't shoehorn one into a situation where the other makes more sense. And sometimes either will work for a particular situation and that's fine too; use whatever you find most ergonomic. They're both very good in their own way.

replies(2): >>46229534 #>>46230689 #
cluckindan ◴[] No.46229534[source]
Try resizing a browser window with nested a flex layout.
replies(1): >>46229580 #
1. tim1994 ◴[] No.46229580[source]
Should you optimize for resize performance? I guess that depends on the app. Use the tool that fits the requirements.
replies(1): >>46230643 #
2. cluckindan ◴[] No.46230643[source]
Resizing is not the optimization target, it just makes reflow performance visually apparent.