CSS is a constantly evolving language. With the widely loved CSS3, developers have been anxiously waiting for the release of CSS4. The problem is, it’ll never happen. But that doesn’t mean it’s going to stop improving, instead, versioning will change.
CSS4 will never happen.
CSS4 will never be branded as the next release because CSS3 was too effective. Like “HTML5”, CSS3 became a trending replacement for “CSS” — and for good reason:
- Browser technology was catapulted forward, especially with outdated technologies that usually required a hacky workaround.
- Old, ugly sites finally had reason to get a significant facelift.
- Out-dated web developer books & curriculums got a much-needed update.
CSS3 was a great step forward for the web & resulted in a never-ending stream of courses, conferences, books, and an untold amount of money made from its use. Branding “CSS4” would technically mean nothing & just be a marketing ploy for more money to be made.
I am proposing that we web developers, supported by the W3C CSS WG, start saying “CSS4 is here!” and excitedly chatter about how it will hit the market any moment now and transform the practice of CSS.
Of course, “CSS4” has no technical meaning whatsoever. All current CSS specifications have their own specific versions ranging from 1 to 4, but CSS as a whole does not have a version, and it doesn’t need one, either.
Regardless of what we say or do, CSS 4 will not hit the market and will not transform anything. It also does not describe any technical reality.
Then why do it? For the marketing effect.
Peter-Paul Koch in 2020
Why won’t CSS4 ever be a thing?
To understand why there will never be a “CSS4”, we need to look at the history of CSS. Its initial versions were a single, monolithic specification. That’s no longer the case.
The old monolithic specifications contained every possible CSS property and value. It worked because there wasn’t much CSS to detail. CSS1 mostly covered features for formatting text documents, additional features and clarifications were added to CSS2 and CSS2.1.
The problem with monolithic specifications is in order to finish the spec, every component part also has to be finished. As CSS has grown in complexity, and new features added, it no longer makes sense to draw a line at which all work is stopped on all parts of CSS in order to declare that CSS version finished.
Therefore, after CSS2.1 all the things that had been part of the 2.1 specifications were broken down into modules. As the new CSS modules included all that had gone before plus any new features, they all came into being at Level 3. Hence CSS3, and people like me who understood CSS as a single specification referred to the group of Level 3 modules as “CSS3”.
CSS hasn’t stopped evolving.
Just because there’s never going to be a CSS4, doesn’t mean CSS has stopped evolving. Quite the opposite in fact. It’s now evolving faster than ever because of the move away from monolithic specifications.
Now that each CSS module evolves independently, the timeline is blurred and will not be possible to establish a common date for all modules. This together with the different possible phases of each document (Working Draft, Candidate Recommendation…) makes the evolution of each module independent and more in line with the evolution of the web.
CSS4 selectors — nope. CSS changes.
So what’s new in CSS? What can we expect to be added and improved on? Lots.
The “parent” selector.
Before, there was no option to select the parent of an element in CSS (not even CSS3). Selectors Level 4 Working Draft includes a :has()
pseudo-class that will provide “parent” capability. It will be similar to the jQuery implementation.
li:has(> a.active) { /* styles to apply to the li tag */ }
Matches any pseudo-class.
The :matches()
CSS4 selector is the standardized version of Mozilla’s :-moz-any()
pseudo class. This new proposal can simplify the process of writing complex CSS.
:matches(section, article, aside) h1 {
font-size: 2em;
}
In Conclusion
Being a frontend developer is unlike it was in the past, where big changes would happen ever decade or so. The change to CSS versioning allows CSS to evolve faster than ever — and also means there will never be a CSS4, that’s a good thing.
What are your thoughts? Are there any CSS updates you’d like to see or hacks you use to accomplish some of the upcoming releases? I’d love to hear what you think, comment below.
All comments posted on 'CSS4 — It was never meant to be.' are held for moderation and only published when on topic and not rude. Get a gold star if you actually read & follow these rules.
You may write comments in Markdown. This is the best way to post any code, inline like `<div>this</div>` or multiline blocks within triple backtick fences (```) with double new lines before and after.
Want to tell me something privately, like pointing out a typo or stuff like that? Contact Me.