Hacker News new | ask | show | jobs
by nobbyclark 4466 days ago
So we return to tables ...
6 comments

It may seem like that, but the major difference is the layout is left to the CSS. When combined with css media queries, the grid can provide a complete restructuring of the layout completely independent of the markup which would not would have been possible with tables.
Grids are also significantly more flexible and more responsive than tables. You finally get reliable vertical centering of elements as a side-benefit.

Tables got a very bad name because they were abused back when they were the only thing available for layout: "if the only tool you have is a hammer..." Yes, but sometimes data is actually tabular.

Grids are good for UI layout. The web was just for documents, but not any more. So now we need good ways to lay out UIs.

> You finally get reliable vertical centering of elements as a side-benefit.

Worth noting that you already get this with flexbox's align-items: center, which you can use today!

A comment on the original link stated that 'flexbox is slow', someone responded with a question; 'is the spec inherently slow or just current implementations?' but no-one elaborated.
>Tables got a very bad name because they were abused back when they were the only thing available for layout: "if the only tool you have is a hammer..." Yes, but sometimes data is actually tabular.

Not only that: layouts are actually tabular (grid based) themselves. That's why tables were, even if not created for layout, an untuitive fit for doing layout work.

This is a hugely important difference.
We shouldn't have left tables in the first place. Design (including flexible responsive design) is ALL about grids.

Since they didn't have them in the early days, the used HTML tables, which weren't designed for that, but have lots of the needed behavior built-in.

Then came the idea to use floats, which was a horrible idea. Floats weren't designed for layout either (they were designed to, well, float simple elements, e.g let text flow around an image and such).

So designers, instead of abusing tables (which weren't meant for layout, but at least had what was needed), they started abusing floats (which weren't meant for layout AND didn't have what was needed, without ugly hacks and workarounds).

Flexbox and the Grid Layout are actual layout systems, designed for that very purpose. Finally.

Yep basically.But we were alreday there with .row an .col-md-3, what's the difference between this and a table ?

semantics? yeah right.

By the way, tables can be made responsive too.

I can't tell if this is 100% sarcasm, 100% serious, or somewhere in-between.
The sad part is that he or she isn't 100% wrong.
The good part, that he or she is 100% wrong.
> But we were already there with .row an .col-md-3, what's the difference between this and a table ? semantics? yeah right.

I think that's a reasonable position to hold and I'd like to hear more detail of your rebuttal.

At 1:35 he says "you can do all sorts of things you can't do with tables". I think I'll continue learning jQuery Mobile and run on a wide variety of devices and PC's.

http://demos.jquerymobile.com/1.3.0-beta.1/docs/content/cont...

Not at all. I don't think you understand what's being discussed.
tables are a superb layout element. if this css addition makes them "semantically acceptable" to the purist crowd, i'm all for it.