News for hackers. Stuff that matters.
Re:Flexible data tables with CSS Grid by leokennis on Saturday May 18, 2019 @09:37AM (#19947313)
Now we’ve gone full circle from using tables for layout, to using layout for tables.
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)
Re:Flexible data tables with CSS Grid by codetrotter on Saturday May 18, 2019 @11:18AM (#19947874)
I am unable to properly select the text in the “tables” in the OP in Safari on iOS. Don’t know if this is due to a problem with Safari or with the way OP did their stuff but either way it is really annoying.
Re:Flexible data tables with CSS Grid by deno on Saturday May 18, 2019 @11:40AM (#19947996)
Selecting works in Firefox. It even behaves as you would expect if you copy-paste to e.g. Libreoffice, because the markup is still a table.

The only thing that doesn’t work is selecting cell ranges in the browser. At least in Firefox, for regular tables, you can do that by holding ctrl or shift while selecting. I guess you could restore this behavior with some Javascript.

Also no idea how this impacts any a11y related things.

Re:Flexible data tables with CSS Grid by runarberg on Saturday May 18, 2019 @05:40PM (#19949872)
They use `display: content` which many assistive technologies will incorrectly remove from the accessibility tree (or at least they used to). So it is not currently recommended to use this this value if you want the content to be accessible.

https://hiddedevries.nl/en/blog/2018-04-21-more-accessible-m...

Re:Flexible data tables with CSS Grid by test1235 on Saturday May 18, 2019 @04:36PM (#19949591)
I'm thinking if you strip away the js and css, it's just a plain ol' table in the html .. wouldn't have thought it'd be an issue, accessibility-wise.
Re:Flexible data tables with CSS Grid by runarberg on Saturday May 18, 2019 @06:05PM (#19949985)
Actually when you have a `display` of something else then `table` you will strip away the table semantics from the accessibility tree (unless you add `role="table"` etc on the table elements).

https://developer.paciellogroup.com/blog/2018/03/short-note-...

Re:Flexible data tables with CSS Grid by deno on Saturday May 18, 2019 @05:28PM (#19949816)
I would hope so, but you never know.