4 ms·
Mobile view of tables is the worst, since they almost always horizontally overflow the narrow screens. I suggest that's another reason tabular non-tables have s
by webstrand 4y ago
Mobile view of tables is the worst, since they almost always horizontally overflow the narrow screens. I suggest that's another reason tabular non-tables have stuck around.
Nowdays, with `display: contents` (on the tbody/tr) you can use `display: grid` to do the layout for your table, too, making it easier to make the table responsive.
CSS lets you do other fun things to tables, too. For example
https://ffoodd.github.io/chaarts/pie-charts.html https://ffoodd.github.io/chaarts/pie-charts.html uses tables, but does not display like a table.
- thunderbong 4y agoHave you ever done a 'View Source' on the HN comments page?
- deleted 4y ago[deleted]
- goatlover 4y agoWouldn't table markup be the correct semantic designator for tabular data? Plus the plugins that work with tables, the ease of copying tables from the screen to spreadsheets, that screen readers know what tables are, etc.
- webstrand 4y agoYeah, I'm not saying don't use tables. Do use tables, they're great for accessibility, but don't feel tied to using table layout; CSS has some great alternatives now that preserve the HTML structure of the table, but display it differently.