News for hackers. Stuff that matters.
Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @10:12AM (#8437744)
"Any donkey can kick down a barn, but it takes a skilled carpenter to build one."

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.

Re:CSS: It was twenty years ago today by cousin_it on Friday October 10, 2014 @11:00AM (#8438037)
The comment you're replying to already contains answers to your points. The complainer mentions his credentials as a programmer, and points out an alternative that exists. You can see that alternative at work by viewing the source of this page.
Re:CSS: It was twenty years ago today by wodenokoto on Saturday October 11, 2014 @08:59PM (#8443938)
If you viewed this on a phone, you'd see that the table based layout is not up for the task either.
Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @11:15AM (#8438133)
It's 2014, and you want to discuss tables vs CSS layouts? Maybe next week we can discuss whether anyone will ever need a hard drive bigger than 2MB.
Re:CSS: It was twenty years ago today by cousin_it on Friday October 10, 2014 @11:34AM (#8438231)
Well, Paul Graham became popular by writing online essays about Lisp, which was invented in 1960 and went out of vogue during the AI winter of the 1970s. Then he started Y Combinator and wrote Hacker News in a dialect of Lisp. If you think old tech is bad, why are you here? ;-)

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.

Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @12:06PM (#8438462)
1. It's pretty easy to find stories of somebody having success using an old technology, but it's even easier to find examples of old technologies being replaced by something better.

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.

https://www.hotdesign.com/seybold/03overview.html

Re:CSS: It was twenty years ago today by debaserab2 on Friday October 10, 2014 @01:27PM (#8438990)
I wouldn't really use reddit as an example of quality CSS styling. Yes, it can be used improperly. It can also be used to create clean semantic HTML. Table-as-layout cannot.
Re:CSS: It was twenty years ago today by gdrulia on Friday October 10, 2014 @10:32AM (#8437869)
Totally agree to your point.

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.

Re:CSS: It was twenty years ago today by chc on Friday October 10, 2014 @12:56PM (#8438785)
http://gridstylesheets.org/ is CSS with constraints and sugar for things like grid layouts. As easy as CSS in simple cases, but powerful enough to handle more complicated cases that require either elaborate hacks or JavaScript with CSS as it exists today.
Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @02:42PM (#8439378)
Thanks for the link. I need to spend some time looking at this.
Re:CSS: It was twenty years ago today by Someone1234 on Friday October 10, 2014 @10:34AM (#8437881)
Unfortunately in the current climate you're unlikely to see someone even try to develop a competitor to CSS, JavaScript, or HTML.

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.

Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @10:43AM (#8437941)
Part of the achievement of CSS is precisely that they have managed to convince every browser vendor to support it. It has overcome or is strongly competing with Flash, ActiveX, native apps, PDF, and a lot else.

This magical CSS replacement would have to do that, even if CSS didn't exist.

Re:CSS: It was twenty years ago today by jl6 on Friday October 10, 2014 @12:29PM (#8438612)
Coming up with a competitor to CSS, HTML and JavaScript is a fruitless "if I were king" fantasy.

The way forward is to develop what we have to make it better, incrementally. Local maxima be damned, there is no alternative.

Re:CSS: It was twenty years ago today by cozuya on Friday October 10, 2014 @11:18AM (#8438152)
> 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.

With IE10+ silently shipping evergreen by default its hopeful that this part of that problem will go away in the near future.

Re:CSS: It was twenty years ago today by Retric on Friday October 10, 2014 @10:28AM (#8437849)
HTML
Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @10:47AM (#8437963)
Do you remember coding rounded corners in HTML? Slicing images, putting a 3x3 table with rowspans and colspans? That was easier than `border-radius: 3px`?

And I have seen no solution for how we might code responsive layouts in pure HTML.

Re:CSS: It was twenty years ago today by Retric on Friday October 10, 2014 @11:38AM (#8438268)
Your making a lot of assumptions, but to be pedantic strait text + links is both pure HTML and a responsive layout. Sure CSS is useful, but IMO most of the pain from HTML / CSS / JavaScript is trying to recreate native application's pixel perfect layouts in a webpage. Also, I think you can embed all CSS functionality into strait HTML5 the advantage is CSS is concise not necessary. Granted, not something you want to create by hand, but if your code is generating HTML anyway it's not such a big deal. EX: <style>

In the end CSS was designed to allow you to swap CSS styles independent of the underlying HTML not add new functionality to HTML.

Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @12:31PM (#8438622)
> strait text + links is both pure HTML and a responsive layout

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.

Re:CSS: It was twenty years ago today by BigChiefSmokem on Friday October 10, 2014 @10:20AM (#8437804)
Your point is valid but please don't defend CSS, we deserve something better.
Re:CSS: It was twenty years ago today by blowski on Friday October 10, 2014 @10:28AM (#8437847)
I, for one, have given almost nothing back to the CSS. I don't read the papers, get involved with testing, implementation, or any of that. I don't even deserve table-based layouts.