←back to thread

197 points OuterVale | 2 comments | | HN request time: 0.415s | 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 #
1. zwnow ◴[] No.46229152[source]
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.
replies(1): >>46247284 #
2. cluckindan ◴[] No.46247284[source]
The issue with nested flexboxes is that flexbox containers size their content to match the container.

Therefore, to calculate the size of an item, the sizes of other items need to be known. Now, if one of the items is a flexbox, its item sizes cannot be known until the previous flexbox is laid out.

Of course, properly using flex-grow and flex-shrink can optimize that calculation, but what about deeper nested flexboxes?