News for hackers. Stuff that matters.
Re:Flexible data tables with CSS Grid by _greim_ on Saturday May 18, 2019 @03:18PM (#19949209)
This made me laugh. To be fair, the article talks about restyling <table> and related elements using grid instead of table display, rather than building tables using a bunch of <div> elements, which was a real thing I saw people advocate for during the whole anti-layout-table backlash.
Re:Flexible data tables with CSS Grid by ceeessess on Saturday May 18, 2019 @06:34PM (#19950096)
It can be better to use divs instead of tables in some situations, especially when you want to display thousands of rows inside of a relatively complex DOM structure. All browsers seem to render them faster, but in Chrome specifically there are bugs like this: https://bugs.chromium.org/p/chromium/issues/detail?id=461877 and one that can trigger a huge cascade of recursive style recalculations (which in practice freezes browsers for a few seconds). Virtual scrolling is another way of avoiding this problem but it can be tricky if you don't know the height of the rows.
Re:Flexible data tables with CSS Grid by pault on Tuesday May 21, 2019 @05:03PM (#19975015)
Last year I had to build a UI with several thousand rows in a data grid. Of course I used a table for this, since tables are for displaying tabular data! Once I got a full set of production data into it, scrolling the page absolutely crushed the browser, running at about three frames per second. I believe the issue was actually caused by a parent element with overflow: scroll-y, but switching to divs made it run smooth as butter.
Re:Flexible data tables with CSS Grid by astura on Sunday May 19, 2019 @06:13PM (#19955868)