Due to the ever-growing popularity of React, Facebook’s user interface library, there has been some discussion on the topic of CSS and whether or not it has a future in its current form — that is, in the form of declarations in a separate stylesheet that provide presentation information for a given page or section of markup.
I’m not going to rehash the conversation or the pros and cons here. For those not familiar, here are a few links you can check out:
- The Debate Around “Do We Even Need CSS Anymore?” by Chris Coyier
- React: CSS in JS slides and video presentation
But what I will do is provide some strong evidence that CSS is alive and well.
The developers are restless
- Developers are passionate about CSS
- Developers are not happy with some of the proposed solutions for large CSS projects
The two links in the second bullet point in the introduction above are a slide deck and video presentation by Christopher Chedeau, a developer working for Facebook on the React project. This past week was the first time I tried delving into React a little bit, thanks to this great tutorial by Shu Uesegi. After that simple introduction, the slides gave me a little more context.
The screenshot below captures one of Christopher’s pertinent slides in this regard, outlining the 7 problems that React attempts to address:
So it’s clear that it feels like a CSS revolution is needed and some might say it’s already under way. But it’s also clear that CSS in its current form is not going away anytime soon.
CSS tips and tricks are in high demand
If you were keeping tabs on your RSS feeds and Twitter stream in the past week or so, then you probably came across my most recent CSS article. That was one of the most enjoyable articles to write, and judging by the incredible response in the comments and on social media, I’m glad to see that it was as enjoyable for readers.
The popularity of those types of articles demonstrates that developers still love CSS in its traditional form. Tweets by Ilya Grigorik, Smashing Magazine, CSS-Tricks, and others were shared and favorited hundreds of times. And the traffic to that article and its predecessor has been amazing.
The content in my articles is mostly covering stuff that’s been available in browsers for years, not just the new “CSS3” features. In fact, I intentionally tried to use as many cross-browser CSS tips as possible and the response has been overwhelming.
But this sort of thing is not unique to my article. Consider past CSS articles on other sites that have been hot in the community. Two that immediately come to mind are, not coincidentally, both by Heydon Pickering:
Readers eat that stuff up! CSS developers of all levels, and even back-end developers, are sure to enjoy that kind of content. It has a special appeal because it’s unique and it demonstrates that there is always something new to learn in CSS. I don’t know what the traffic numbers for those articles were, but I’m sure they were very high in comparison to other articles on the same sites around the same time.
CSS books are in high demand
Her “secrets” presentations have been a few of the most shared and popular presentations from the conference circuit over the past 5 years. No wonder she’s used that premise to spawn a book project.
As of this writing, Lea’s book is ranked in the top 3,000 books overall on Amazon (that’s all books included, not limited to web development) and it’s in the top two or three in a number of different developer-specific Amazon categories.
Again, this demonstrates that CSS in its current form is still in high demand and is not going away soon.
Similarly, here at SitePoint, we’re still pumping out lots of CSS content in the form of books and courses on SitePoint Premium (formerly Learnable). Some of the most popular titles available on SitePoint Premium are the CSS-based content. And there’s more CSS content in the works. So the demand is not slowing down.
React won’t kill CSS
As Chris Coyier pointed out in his post (linked above in the intro):
Nobody is saying we don’t need styles. We still need to style things, what’s being talked about is how and where we do that.
And it should also be noted that there’s a lot of important stuff that React doesn’t handle well. So we have a long way to go before we hang up our
.css files and move everything into our scripts.
That’s my current and probably somewhat ignorant view, based on some of the things I’ve been observing over the past week. What do you think? Can traditional CSS coexist with React-like implementations? Or is React’s current model just a fad that will likely evolve to something more in line with what we’re used to? Let me know your thoughts.
The Principles of Beautiful Web Design, 4th Edition
Learn PHP in One Day and Learn It Well
Docker for Web Developers