Live data from Hacker News

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

developers.google.com

81–90 of 280 posts

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

#81
post #60

Earlier quoted context omitted.

That's a problem to be sure, but sometimes I wonder if this is much better:

It's not, clearly. Modern "grid-based layout" frameworks are just the next generation of table-driven web layouts, and they're frequently shoehorned into webpages in ways that hearken back to the olden days before CSS was invented. is one of my least favorite things to see in HTML, in particular. No shit it's a container; all HTML tags are containers . HTML5 introduced all these wonderful semantic elements precisely…

Also, that "text-center" class drives me to drink :)

It's a standard component of Bootstrap ;)

http://getbootstrap.com/css/#type-alignment

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

#83

Earlier quoted context omitted.

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.

Isn't this more of a sign that Voiceover is broken, as even a "true" single column table should not be read that way?

Potentially, although it’s not VoiceOver but what the browser exposes as an accessible table. Chrome and Firefox have horrible hand-coded algorithms to determine what should be a data table or not:

https://dxr.mozilla.org/mozilla-central/source/accessible/ht...

https://cs.chromium.org/chromium/src/third_party/WebKit/Sour...

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

#84

Earlier quoted context omitted.

No there is, try using a screen reader, it reads out the header in front of every cell, its really hard to understand vs a semantic document with css styling for people not living with disability.

Accessibility is dead, alas. It is extremely sad to watch what is happening with the web right now. All the good initiatives are being forgotten in the chase for the latest fad. "You were so excited that you could that you've forgotten to think if you should" can describe a lot of movement in this space. Even without the accessibility in mind, go to http://csszengarden.com/ and try to replicate that with tables. Bare…

Web apps are all slow and crap anyway.

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

#85
post #19

If we all had something like Display Postscript, this layout thingamajig would be delegated to libraries, and we wouldn't have to ask the browser deities to bestow new gifts upon us. Good adaptive layout would be closer to a new version of jquery and less Windows XP Service Pack 51.0.2b. (We also would have more sites that looked liked late 90s Flash, but then again, we're moving that direction anyway, just with more…

If we're lucky, we might get exactly that with Houdini. It's a proposed spec that -- if implemented -- will allow programmatic control of the browser's styling and layout process. Check it: https://www.smashingmagazine.com/2016/03/houdini-maybe-the-m...

Here's the GitHub repo: https://github.com/w3c/css-houdini-drafts

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

#86

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

Do you mean literal markup, or tables in CSS such as display: table Using CSS surely can improve the screen reader experience by the markup not being actual tables.

Screen readers haven't been confused by tables since about 1998.

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

#87
post #47

Earlier quoted context omitted.

I do to, sometimes. I wonder if there is any thought given to making tables responsive rather than reinventing the wheel here.

The (theoretical) issue here is that a "table" has a certain semantic meaning ("a container for tabular data"), and that using a table for something outside that semantic meaning can introduce confusion, be it for fellow programmers (including your future self!) or for those who are interpreting your page in weird ways (robots, people using screen readers, etc.). In the few times I actually bother with frontend "desi…

I have 30,000 unique visitors to my website every day. The number who care whether HTML tags are being outside their semantic purity is zero.

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

#88
post #19

If we all had something like Display Postscript, this layout thingamajig would be delegated to libraries, and we wouldn't have to ask the browser deities to bestow new gifts upon us. Good adaptive layout would be closer to a new version of jquery and less Windows XP Service Pack 51.0.2b. (We also would have more sites that looked liked late 90s Flash, but then again, we're moving that direction anyway, just with more…

> this layout thingamajig would be delegated to libraries

This is actually happening. The major vendor libraries are working on API's to give JS library authors the ability to hook into the browser layout process and define their own layout mechanisms

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

#89

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 "screen readers" argument is cargo cult in 2017.

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

#90
post #25

Both Android (ConstraintLayout) and iOS (Auto Layout) use Cassowary. Why not just implement this with CSS as well so we can use the same layout tech for every platform?

The projects listed here under "Web" try to achieve that: http://overconstrained.io/
Post reply on HN