Live data from Hacker News

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

developers.google.com

181–190 of 280 posts

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

#181
post #92
post #50

Earlier quoted context omitted.

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.

> Screen readers assume the content inside a table is tabular I'm curious to hear from screen reader users. I recall that the gap between "what web developers think screen readers do" and "what screen readers do" has always been sizable.

Windows based screen readers (more sophisticated than Mac's VoiceOver), let the users treat only data tables as tables and ignore layout tables. Also users can adjust announcement of only column headers, only row headers, both or none while navigating through the data table.

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

#182

Earlier quoted context omitted.

I don't know if developers even care about semantic markup anymore, just have your 5 meg of JavaScript squirt out a bundle of divs and to hell with accessibility.

Just render a png file, server side. The only way to ensure pixel perfect layout, and it's even going to use less bandwidth than most JS frameworks these days.

Wrap that sucker in some HTML with tags and you're golden.

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

#183
post #75

Earlier quoted context omitted.

Most divsoup-layouts are not semantic at all, either.

Exactly this. How are DIVs more semantic than TABLE? And who is reading the source? Your developers and a web spider. The web spider doesn't care (I wrote one and getting it to parse DIV content and TABLE content wasn't much effort) As far as I am aware no spider is looking at the DIV and gathering semantic information from it. Sure, it may look at the TABLE and initially assume it has tabular data in it, but a tiny…

Which tiny bit of logic can distinguish between tabular and non-tabular tables?

DIVs are not actively anti-semantic. They are just a-semantic. So they're not particularly right, they're just not actively wrong.

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

#184
post #75

Earlier quoted context omitted.

Most divsoup-layouts are not semantic at all, either.

Not to mention that tables sized using % are as responsive as 90% of their css counterparts, whatever they are.

Good luck transforming a desktop 3 columns layout in a mobile 2 or single column one. Or viceversa.

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

#185
post #43

Earlier quoted context omitted.

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.

was never even replaced properly :)

Between text-align: center; and margin: 0 auto; what's missing?

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

#187
post #72

This doesn't really fix much - if the idea is to continue to use pixel-based positioning. I've got devices with a range of dot-pitches (surface 4 pro, external older monitor, cellphone) - with various physical screen sizes -- A "150px sidebar" doesn't work the same across these devices - and more importantly, for a low-resolution 24" screen I'd probably want a similar 3" side-bar as for a "retina"-resolution 24" scre…

I am wondering if this layout engine also has issues with half-pixel placements? With Flexbox, if you position an element in a way that it lands on a half-pixel, it becomes blurry.

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

#188

Earlier quoted context omitted.

Not to mention that tables sized using % are as responsive as 90% of their css counterparts, whatever they are.

Good luck transforming a desktop 3 columns layout in a mobile 2 or single column one. Or viceversa.

90%

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

#189
post #125

Earlier quoted context omitted.

Originally, it was not known that HTML pages would be so finely designed. It is not a naieve dichotomy, it is an attainable ideal that has had a very positive effect on the state of the web. We owe huge thanks to this movement that lead both to the demise of proprietary browser extensions (like flash) and to the awesome technologies in browsers today such as these CSS features, new HTML elements and transport protoco…

These things, while beneficial, don't owe their existence to CSS. Instead, introducing eg. CSS shapes or `content: ` (as two extreme examples) was the way of least resistance/guerilla tactics, as opposed to putting the functionality into SVG proper, or aligning the layout box model better with the DOM model, resp. Now what we're left with is a way overcomplicated mess for generations to clean up. There's a reason Moz…

I agree. Most of the HTML I write is to create structure for CSS to use. For example, a `div` is a container, but we put it on the content side.

What would have been better would be a flat map identifier -> binary (or string or whatever, your choice) as the content, and then "CSS" (quotes because it wouldn't be the CSS we know now) would declare the layout/look and would read the content map for insertion into placeholders declared in the "CSS". I've omitted programmable considerations cause this is a HN comment and not intended to be formal proposal. Not surprisingly, the web has kinda already shifted towards this, through the use of JSON APIs in JS.

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

#190
This is one of the things that frustrated me about the web world. Stuff that you could do in 2000 with real UI kits is finally making its way to the browser. Java/Swing and Qt could do this years ago, and more elegantly.

I don't suppose there is any momentum for starting over with something not based on a simple word-processing model, but with a real UI foundation.

Post reply on HN