Live data from Hacker News

CSS Grid – Table layout is back. Be there and be square

developers.google.com

41–50 of 280 posts

Re: CSS Grid – Table layout is back. Be there and be square

#41
post #34

Makes you wonder why HN won't budge with those tags in the source code. One day I hope to see "Table layouts are back with tags" and the HN programmers would have saved themselves so much work.

Would there be a benefit to changing from to something else, if works just fine for the purpose? If it ain't broke, right?

It is broken. Every single comment is announced (in Voiceover at least) with “Row x of y. Column 1 of 1”. With proper markup you could either avoid that entirely, or announce a correct relationship with ARIA attributes.

Re: CSS Grid – Table layout is back. Be there and be square

#42

I still use plain old tables in 2017. Number of unhappy customers: 0

Except anyone with accessibility requirements, no? As far as I know tables are horrible for anyone with a screen reader. Can you annotate tables somehow to work for accessibility purposes?

Re: CSS Grid – Table layout is back. Be there and be square

#43
post #39

Makes you wonder why HN won't budge with those tags in the source code. One day I hope to see "Table layouts are back with tags" and the HN programmers would have saved themselves so much work.

What, exactly, is the problem with the tag in the first place? Been a long, long time since I last touched HTML

There's no problem. But sometime around 2003 it became trendy to do all layout in CSS, even when a table or a tag would do just fine.

Re: CSS Grid – Table layout is back. Be there and be square

#44
post #16

The biggest game-changer to me seems to be the last example, with `grid-template-areas`. I could probably explain this in a matter of minutes (as opposed to flexbox).

I first encountered that idea in chicken scheme's fltk gui binding package:

http://wiki.call-cc.org/eggref/4/bb#ascii-picture-interface

Re: CSS Grid – Table layout is back. Be there and be square

#45
post #5

why is this better than tables?

Because indicates that it contains tabular data, and implies lots of things about the content that it contains that would be misleading when using table-based layout. And display: table, which uses CSS to make things look the same, without implying anything about the content, wasn't supported by Microsoft, back when they they were a) the only browser that mattered, and b) trying to hold back the web to protect their…

Well the issue of semantics was not exactly solved by turning everything to s. It's still a mess, but a different mess. I would even say it's bad to have display:table-cell because it's reduntant.

Re: CSS Grid – Table layout is back. Be there and be square

#48
post #39

Makes you wonder why HN won't budge with those tags in the source code. One day I hope to see "Table layouts are back with tags" and the HN programmers would have saved themselves so much work.

What, exactly, is the problem with the tag in the first place? Been a long, long time since I last touched HTML

It's neither flexible nor semantic.

Flexibility is what allowed webpages to be "responsive" before media-queries even existed, and semantics is what allows accessibility, search engines, and other html parsing tools ("readability" in Firefox and Safari, ...) to function better.

The only advantage it has is that it's old and predictable. That's why it's still used to format emails for instance, it's reliable and works on most supports.

Re: CSS Grid – Table layout is back. Be there and be square

#49

This is excellent. And with the fast pace of browsers, and the improved habits of users (or automatic updates), it should be available for 95%+ of users within a year (It's in the current Safari Technology Preview, so Safari should get it with the next macOS point update). This is also a good moment to remind people that you don't need Bootstrap and the like as much as you used to. Grids were 90% or the reason people…

> it should be available for 95%+ of users within a year

only if you don't have enterprise customers. Those will continue to run IE11 for the foreseeable future as IE11 will remain supported in Windows 10 until 2025.

While Microsoft is pushing Edge as an IE replacement, Edge is still lacking features and looks too different from IE for companies to feel comfortable pushing it to their users without retraining them.

Re: CSS Grid – Table layout is back. Be there and be square

#50

I still use plain old tables in 2017. Number of unhappy customers: 0

Except anyone with accessibility requirements, no? As far as I know tables are horrible for anyone with a screen reader. Can you annotate tables somehow to work for accessibility purposes?

The problem with screen readers is summarized "Screen readers assume the content inside a table is tabular". Are divs better just because they are undefined? It seems to me that the problem would more easily be solved by adding some attributes to skip tabular treatment or to add captions, rather than ditching tables altogether. Table elements like could even be used to identify and access parts of the UI pages.
Post reply on HN