The buzz is happening and people are really seriously talking about getting rid of CSS in their web applications. I’m not going lie – I thought the notion was ridiculous when I saw the first headlines. In fact, I initially assumed that it was just another trendy discussion from people who like theorize but not build real world software. But, then some well versed people started to get on the band wagon, and I read some great articles.
Among one of my favorite articles on this topic that you should read before continuing on this one is:
https://css-tricks.com/the-debate-around-do-we-even-need-css-anymore/ – This is a clear explanation on the debate at hand from both sides of the argument, and very well written. Thanks for this Chris!
I have to say that in more recent applications I have been putting together I can highly identify with some of the issues we face with CSS that really no one want’s to admit. Mainly the fact that everything is Global is a large concern for me. We have fought many battles attempting to ensure proper namespacing and standardization inside our CSS / LESS files. To be honest, I still get scared of the changes. You never know when a particular convention was not followed, and perhaps are using the same style in another component that is not locked down to your convention. And of course, this means no one will ever delete anything….it just grows… for its entire life.
I think anyone working on a substantially large project can identify with these core issues at some level, and it is clear to me that how to solve these problems are at the heart of the suggestion to get rid of CSS! Getting rid of CSS is simply the suggestion in solving this core problem. It is important to get at the root of the issues in order to identify a possible solution.
That being said, WE STILL MUST STYLE OUR APPLICATIONS WITH CSS – there is no way around that. In my introduction to this debate, I was initially left with the impression that the suggestion was to literally get rid of it… which just is not the case. The article above attempts to explain this thought a bit better as well, and discusses inline styles vs cascading style sheets.
Although, I can’t help but think how ridiculous it would be to store all my chrome, headers, footers from the standard site design into inline styles. There must be a happy medium here? I hope….
So far the best solution that I prefer in practice is a combination of the solutions above:
I’ve found that following these two guidelines keep my templates readable without large amounts of inline CSS, easily allow global alterations to truly global elements when I want, and creating / using a CSS Framework make myself highly efficient in designing new page templates as needed.
All of this being said, I’m just a guy trying to build well-architected applications. Generally the concrete implementations of “well-architected” changes every day as I learn more. What are your thoughts on CSS in this debate?