News for hackers. Stuff that matters.
Re:Ask HN: How do you display HTML tables on any screen size? by uzername on Tuesday July 04, 2023 @07:47PM (#36593945)
I recently saw a cool trick with css and tables. Using after pseudo selector with content and the attr css function, the small viewport layout showed the th labels without having to have two simultaneous tables in the dom. I think the downside of this could be accessibility issues, since I'm not sure if a screen reader would see those virtual labels vs literally reading what's in dom.

https://developer.mozilla.org/en-US/docs/Web/CSS/attr

There are no comments on this comment yet.