Hacker News new | comments | show | ask | jobs | submit login

This is awesome. I don't understand why people are hating on CSS (for one, their hatings don't include reasons why); to me it is a beautiful way to separate form from function. Changing that one button from green to blue? Easy enough with or without CSS. Changing that same button in every one of its 163 possible locations? CSS saves lives in these scenarios.



If you have a large code base with lots of UI then CSS becomes very brittle to change. Nest some UI elements that have never been nested before and something will break. One tiny change in one place affects something somewhere else. You have start making exceptions, a duplicate a rule here or maybe an !important there. Eventually you're got nothing but exceptions.

Personally, I think the concept of declarative styling is brilliant but the implementation in CSS leaves a lot to be desired. It's far more error-prone than necessary.


CSS is used for two different things: styling and layout. CSS for styling is great, since you can declare your colors or font sizes or whatever in one place, and easily make changes to them across the board. I don't think many people would dispute that is useful.

CSS for layout on the other hand, I've always found to be a massive pain in the ass, full of counter-intuitive weird hacks. (For example: the 243342 approaches to centering elements relative to one another, often requiring hacky nested divs to ensure things work in IE.)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: