←back to thread

197 points OuterVale | 2 comments | | HN request time: 0.449s | 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 #
Angostura ◴[] No.46230316[source]
> Related: I also love when I can't paste tabular data into Excel/etc. anymore

Except that’s exactly where tables should be used. So if you can’t, someone has really misunderstood CSS.

Use it for tables, not for layout.

replies(2): >>46231522 #>>46248039 #
wanderingstan ◴[] No.46231522[source]
I’ve gotten in several arguments over the years where webdevs insisted on showing tabular data using flexbox or hardcoded div widths or worse. They insisted that html tables were never ever to be used and couldn’t be persuaded.
replies(3): >>46231713 #>>46232019 #>>46234182 #
1. idbehold ◴[] No.46232019[source]
If you try to render tables with millions of cells the browser does a really poor job and the performance is abysmal. The only solution when you need to render that many cells is to virtualize the table and only have the visible cells (plus some buffer) actually in the DOM at a time. That plus weird restrictions browsers put on certain table elements (looking at you thead) that prevent them from being "sticky" headers means that the developer is left with absolutely positioned divs as the only solution. Blame browser vendors for not providing a native way to present tabular data with more than a few hundred thousand rows without causing performance issues.
replies(1): >>46234081 #
2. pornel ◴[] No.46234081[source]
there's table-layout:fixed that makes rendering of large tables much faster.

I'd argue that if you have so many rows that DOM can't handle, humans won't either. Then you need search, filtering, data exports, not JS attaching a faked scrollbar to millions of rows.