News for hackers. Stuff that matters.
Re:Making Tables Responsive with Minimal CSS by Sujan on Tuesday June 11, 2019 @09:11AM (#20155052)
I like the idea behind this article, but "Responsive Tables #2: Flexbox" really is a pretty good example of what _not_ to do.

Just hiding the table header definitely does not work - this is how I first "read" the data:

- Slice of Pizza = 450

- 95% = $5.00

- Common = 8/10

And this clearly doesn't make any sense at all.

PS: I would love to see Markdown formatting make it to HN comments one day...

Re:Making Tables Responsive with Minimal CSS by bradley_taunt on Tuesday June 11, 2019 @09:18AM (#20155110)
The CodePen "Responsive Table 2.5" further builds on that example and tackles that exact problem you mention (by including the heading of what each cell represents)
Re:Making Tables Responsive with Minimal CSS by bastawhiz on Tuesday June 11, 2019 @11:23AM (#20156228)
If you're putting the heading in each cell, it kind of defeats the purpose of using a table to begin with, no? If I was so painted into a corner by mobile support and refused to make scrolling friendly (e.g., by pinning the left column), it sounds like just not using a table in the first place is a much better solution.
Re:Making Tables Responsive with Minimal CSS by debaserab2 on Tuesday June 11, 2019 @04:18PM (#20159151)
Inheriting this kind of functionality with just a little bit of CSS is pretty dang convenient though and a pretty sensible default, if nothing else.
Re:Making Tables Responsive with Minimal CSS by bhaak on Tuesday June 11, 2019 @11:29AM (#20156296)
Yes, not using tables is the best solution for mobile support.

But sometimes you can't do without. Then it's nice to know your options.

Re:Making Tables Responsive with Minimal CSS by masklinn on Tuesday June 11, 2019 @12:42PM (#20157071)
> PS: I would love to see Markdown formatting make it to HN comments one day...

Sadly, properly formatted comments don't bring paulg joy.

Re:Making Tables Responsive with Minimal CSS by airstrike on Tuesday June 11, 2019 @09:28AM (#20155181)
Remove the borders and background shading from that example and it will read just fine as a set of attributes
Re:Making Tables Responsive with Minimal CSS by Sujan on Tuesday June 11, 2019 @09:59AM (#20155426)
Yes, but these are not attributes. (Or was that your point?)