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

You are right. A single feature isn't a reason to think that an entire language sucks. But in this instance we are talking about a defining feature of the language. They're called cascading style sheets for a reason. I know we're stuck with it for now, that's why I'm ranting. My god, this is like PHP in the 90s, if I rant against something, then "I'm using it wrong" or "I'm too stupid and don't understand how great it is". And in the meantime all the CSS "gurus" are teaching people that to centre an element it is perfectly normal to write { left: 50%; width: 400; margin-left: -200px }. Even worse, they squabble over which way to clear floats is the correct one, when the truth is we shouldn't be having to do this in the first place.


The tech community should have a discussion about the best way to move forward with CSS, but it will probably turn into this: http://xkcd.com/927/

Like it or not, CSS has legacy support built into millions and millions of devices that cannot be easily updated. Newer versions can come forward, but more likely than not, the best thing to do would be to build on frameworks such as LESS (or one of it's cousins) that allows you to code in a meta language. Combine it with some static analysis tools and you can create a system that warns you when you cascade too much (for some value of too much) and help keep you sane.


I guess that is why the web is so great, despite of all the technical problems. There was a good post recently about OOCSS and SASS, I think it is a good approach for now.




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

Search: