[1] http://www.w3.org/TR/css3-flexbox/
Flexbox is the first CSS layout feature that makes me feel like I don't have to harness an army of hacks to get anything done.
That said, it is something of a travesty that one of the most popular reasons to dive down that particular rabbit hole in 2014 is to get real vertical centering: https://gist.github.com/acdha/a91a46706de02c37566a is still 11 lines for one of the most basic layout requirements.
What language would be able to support billions of websites coded by millions of developers, rendered on thousands of different types of media and be easier to code with than CSS? Until I've seen a working demo of this mythical styling language, I'll be very grateful for what I've got.
More to the point, I think the discussion of tables vs CSS is worth reopening, because the original arguments in favor of CSS focused on having clean semantic HTML, and we all see how that turned out. Just go to http://reddit.com/ and view the source, you'll see <div class="spacer"> staring you in the face. So that argument is a wash. As for the specific drawbacks of CSS compared to tables, I think the original comment covered them well.
2. Finding somebody successfully bashing a nail into a wall with a shoe doesn't mean we should all throw away our hammers.
3. If we get into the drawbacks of CSS vs tables, tables are going to lose. I can think of two situations where tables will win - lack of developer skill (yes, tables are easier to learn quickly), and needing to support old browsers more than new ones. Whereas CSS will win on responsiveness, performance, workflow, third-party tools, features, maintenance, accessibility, flexibility, semantics, and just about every other area of front-end development you care to mention.
EDIT: Here's an article from 2003 (!) that makes the same points. As CSS has improved, the arguments have become stronger.
I personally don't have much of experience with different layout systems used in other fields, yet what I got from working with ActionScript3 (flex) layout methods few years ago and then recent experience with current android layout system, just brings back the appreciation of CSS.
It might not be perfect, easily becomes complicated, but it works and allows great flexibility.
The problem is that those technologies are all held hostage by at least two inefficient committees, and enough browser vendors have signed on to that to make doing anything without their approval near impossible.
So let's say you had a magical CSS replacement which is perfect in every way, that's ten years in committee which is a back and forward process where they can effectively force you to alter the design for obscure reasons, and then even after that you have to convince every single browser vendor to implement it, and only then FINALLY will it take another ten years for all browsers to support your new syntax so you can use it freely without worrying about incompatibility.
This magical CSS replacement would have to do that, even if CSS didn't exist.
The way forward is to develop what we have to make it better, incrementally. Local maxima be damned, there is no alternative.
With IE10+ silently shipping evergreen by default its hopeful that this part of that problem will go away in the near future.
And I have seen no solution for how we might code responsive layouts in pure HTML.
In the end CSS was designed to allow you to swap CSS styles independent of the underlying HTML not add new functionality to HTML.
It's a responsive layout, but not one that somebody is willing to pay me to build. Those that people will pay me for are, in my experience, easiest to build with CSS.
<div class="container">
<div class="row">
<div class="col-xs-4">
What do you mean tables produced ugly html?
</div>
<div class="col-xs-3">
Looks totes modern to me ...
</div>
</div>
</div> <body>
<main>
<p>It can be much better if you avoid abusing
HTML classes for style.</p>
<p>Classes are meant to describe the role of
the tag, not its presentation.</p>
</main>
<aside>(use Sass instead)</aside>
</body>
-- /* Sass + Neat */
body { @include outer-container; }
main { @include span-columns(4); }
aside { @include span-columns(3); }I miss them days.
[1] http://swizec.com/blog/i-was-wrong-about-angularjs/swizec/66...
It could have been implemented better, but the underlying thinking that users agents should try to programmatically position elements where possible is sound.
That was the biggest mistake, IMO. John Nagle's comments here [1] express that point really well:
> With Dreamweaver 3 and tables, it wasn’t necessary to look at HTML to lay out a page. With Dreamweaver 8 and CSS, the page designer must understand CSS, HTML, and probably Javascript. That’s was a big step backwards. The CSS system is just too programmer-oriented. And I’m a programmer. (Programmer as in MSCS from Stanford, the Nagle algorithm in TCP, inventor of ragdoll technology, real-time robot vehicle control, not programmer as in “writes some Perl”. And my first web site went up in 1995.) It’s not that CSS is hard; it’s that CSS is bad.
> The worst problem with DIV-based layout is that the layout system is too weak. There’s no form of “grid” layout. There’s no way to relate a DIV to anything but its predecessor, its parent, or an absolute position. The system is just too dumb. That’s why people have to stand on their head just to get three columns to work. Tables actually are a better designed layout system. Table layouts allow table cells which span multiple rows and columns. If all tables could do were simple grids of cells, the CSS approach might make sense, but tables are more general than that.
[1] http://www.raizlabs.com/graiz/2006/09/25/ten-reasons-why-css...