blog.codinghorror.com
What's Wrong With CSS - Coding Horror
Excerpt
Anyway, I bring this up not because *my pokemans, let me show you them*, but because I have to personally maintain four different CSS files. And that number is only going to get larger. *Much* larger. That scares me a little. Most of all, what I’ve learned from this exercise in site theming is that **CSS is kind of painful**. I fully support CSS as a (mostly) functional user interface Model-View-Controller. But even if you have extreme HTML hygiene and Austrian levels of discipline, CSS has some serious limitations in practice. Things in particular that bite us a lot: - Vertical alignment is a giant, hacky PITA. (Tables work great for this though!) - Lack of variables so we have to repeat colors all over the place. - Lack of nesting so we have to repeat huge blocks of CSS all over the place. In short, CSS violates the living crap out of the DRY principle. You are c*onstantly* and *unavoidably* repeating yourself.
Related Pain Points
CSS lacks variables requiring color and style duplication
5CSS historically lacked native variables, forcing developers to repeat colors and style values throughout multiple files, violating the DRY principle and creating maintenance burden.
CSS layout debugging and positioning difficulty
4Common tasks like centering elements require trial-and-error approaches. Layout bugs are notoriously difficult to debug due to the implicit logic of CSS's declarative model.