Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To a point, yes. But CSS, using standards, is still so convoluted that the browser quirks were only ever half of it.

Things like the differences between padding and margin, things like negative margins, CSS precedence, !important, box models, floats, clearing floats, vertical centering, and what kinds of layouts can be done with CSS versus which ones simply require JavaScript due to CSS's bizarre deficiencies at even the most trivial things -- none of these things can be learned quickly, and they seem to require many months of experience to actually get right consistently in practice. And then there are the differing philosophies on how to get CSS not to turn into spaghetti in practice, with things like "object-oriented" CSS and tools like LESS/SASS.

And just stupid things like not being able to define "position: relative" on a <td> so that you can absolutely position things within it, the way you can within a <div>. It may not be a browser quirk, it's just a CSS quirk, but I don't really care -- there are TONS of stupid "quirks" in CSS to keep people in their jobs still. Browsers may not suck any more, but CSS still sure does.



I strongly agree. CSS is rife with extrinsic complexity—complexity greater than the problem domain required. As often happens with such designs, its pieces don't line up and many simple questions have complicated (or no) answers. It's by far the weakest element of the web stack. I often find myself just writing Javascript to adjust layout instead of bothering to learn the CSS for it.

Edit: CSS also seems to me the least webby element of the web stack, in the way that Adam Bosworth brilliantly described the web:

That software which is flexible, simple, sloppy, tolerant, and altogether forgiving of human foibles and weaknesses turns out to be actually the most steel-cored, able to survive and grow, while that software which is demanding, abstract, rich but systematized, turns out to collapse in on itself in a slow and grim implosion. [1]

HTML and Javascript, for all their messiness, have the former quality, while CSS is a case of the latter.

[1] http://adambosworth.net/2004/11/18/iscoc04-talk/ - one of the most insightful things I've read about the web and about software in general.


Thirded.

I'm likely a textbook CSS "hater" according to wisty's post in this thread.

But I don't hate CSS because I don't believe it is powerful, rather because the amount of concepts and context-specific modalities you have to understand to do things that would be trivial with any other layout framework (like vertically center one thing in another thing) is absolutely bonkers.

CSS gurus will often knee-jerk defend it from people who say things like that, but objective third-parties need only read through CSS questions on a site like stackoverflow to see a mountain of questions where someone is trying to accomplish something that is conceptually quite simple and they are faced with page after page of jsfiddle "answer" links that don't actually even fix the problem they were having because their layout implementation was using a different display model on the divs in question (or whatever other random context-specific thing that makes the actual solution non-universal).

Being powerful is nice, and CSS is powerful, but there's something to be said about keeping the simple things simple and CSS fails massively on that.


I agree with you completely but one of the things I always struggle thinking about is what a potential alternate to CSS even looks like. Although there are so many things wrong with it, you can pull off just about any look and feel you want with it. I mean, at least we're not using Swing or handing the decorating off to the OS or something.

In an ideal world, what's the best way to decorate HTML?


I think bootstrap (and similar frameworks) are the closest thing we have. It makes simple tasks like "put these things in a nice grid" or "center this thing" so much easier than if you were using raw CSS.

Bootstrap gets a lot of flak for its styles, but I think its real value is in making layout somewhat sane.


I don't think the article said that CSS and HTML do not have their quirks anymore. What is said was that if that is ALL you could do, that isn't enough for a job, which is true enough. Would you have a use for someone who knows all that, but can't actually write any code?


There are lots of people on the web design via graphic design that fit into this category. Of course there is a range of competency in this group, but at the top end you have the sort of people that can do absolutely amazing things with just HTML and CSS. As someone who focuses on backend and can build an acceptable looking front end, I am blown away by a lot of the examples I see on codepen from people who use no javascript at all.


I'd say the one category of people that might have to worry about future jobs is the 'designer with decent but not expert HTML and CSS knowledge'.


Specialization is key in this regard. If you're really, really good with CSS and HTML, you can find decently paying work doing just that. If you don't specialize in that way, you should probably catch up on 'real' programming what with all the developments in front-end development, and you might even get away with rudimentary css knowledge.


We have heaps of people where I work that do exactly that. CSS all day long without any code (or maybe the occasional bit of jQuery). I couldn't think farthing would rather do less, but whatever ;)


> "none of these things can be learned quickly, and they seem to require many months of experience to actually get right consistently in practice."

That's the same for any language. Especially those that don't just clone the language you already know.

CSS just happens to be the one that takes a structured document and styles it for presentation. Like Latex, like XSL-FO, troff, PostScript. Relatively, CSS is easier to pick up and run with.


> That's the same for any language. Especially those that don't just clone the language you already know.

I don't think that's true. Sure, it takes a bit of time to learn a new syntax, a bit more time to learn language-specific concepts. And every language has it's gotchas and quirks. But most languages I've worked with, even javascript ('the good parts'), are ultimately quite consistent and allow you to focus on solving actual problems pretty quickly.

CSS, on the other hand, has tons of quirks that lead to issues that require either annoying trial-and-error to fix, after-the-fact bugfixing for particular devices or browsers, or a deep knowledge of the logic involved.

Back in high school, I loved mathematics and physics, because difficult things felt 'fair'. And figuring them out felt satisfying. On the other hand, I disliked biology and to a lesser degree chemistry, because it seemed like there were gotchas and quirks everywhere that required rote memorization, not understanding. Or at least not at a high school level.

I've only met a handful of people who seemed to really know the fundamentals of css. These people read the specs, but also played a role in the development of new css features. I think there's still a market for 'true' css/html experts. Knowing the exact ins and outs of html and css across browsers and platforms is arcane knowledge, and if you know this you might get away with not being much of a programmer.

It's just really boring.


Where do compile-to-CSS languages like SASS or LESS fit into this picture?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: