DEV Community

Cover image for When will we have CSS4?
Temani Afif
Temani Afif

Posted on • Updated on

When will we have CSS4?

Never! There will be no V4 release of CSS.

What??

Said like that, it sounds a bit strange but no worries, CSS will keep evolving. We simply need to understand how versioning work with CSS. To be more accurate we talk about Levels.

Let's refer to the official Specification:

Cascading Style Sheets does not have versions in the traditional sense; instead it has levels. Each level of CSS builds on the previous, refining definitions and adding features. The feature set of each higher level is a superset of any lower level, and the behavior allowed for a given feature in a higher level is a subset of that allowed in the lower levels. A user agent conforming to a higher level of CSS is thus also conformant to all lower levels.

A basic illustration to understand the logic:

Leveling

CSS Level 1

Logically, CSS started at Level 1 (a long time ago) but this level is now obsolete

The CSS Working Group considers the CSS1 specification to be obsolete. CSS Level 1 is defined as all the features defined in the CSS1 specification (properties, values, at-rules, etc), but using the syntax and definitions in the CSS2.1 specification. CSS Style Attributes defines its inclusion in element-specific style attributes.

Obsolete doesn't mean that what is defined at that time is now wrong or no more used. If you follow the link to the CSS1 specification you will see the basics of CSS but we should no more rely on it as we have a more up-to-date specification.

CSS Level 2

Things start to become interesting here with CSS2 which has 2 sub-levels. To be more precise we call them revisions:

Over time implementation experience and further review has brought to light many problems in the CSS2 specification, so instead of expanding an already unwieldy errata list, the CSS Working Group chose to define CSS Level 2 Revision 1 (CSS2.1). In case of any conflict between the two specs CSS2.1 contains the definitive definition.

The CSS2.1 specification defines CSS Level 2

In another Specification we can read:

CSS 2.2 is the second revision of CSS level 2 [CSS2]. It corrects a few errors in CSS 2.1, the first revision of CSS level 2

And

CSS 2.2 is derived from and is intended to replace CSS 2.1 and CSS2. Some parts of CSS2 are unchanged in CSS 2.2, some parts have been altered, and some parts removed. The removed portions may be used in a future CSS3 specification. ref

So the CSS2.2 specification defines CSS Level 2 and is the one we should rely on. Relying on the CSS2.1 specification is also acceptable but not the "CSS2 specification"

You can find the difference between the first and second revisions here: https://www.w3.org/TR/CSS22/changes.html. You will see that it's more about clarifying and updating a few definitions rather than adding new properties or values.

The changes between CSS2.1 and CSS2 are more important: https://www.w3.org/TR/CSS21/changes.html

CSS Level 3

CSS stops the leveling here. Yes, there is no CSS3 Specification.

CSS Level 3 builds on CSS Level 2 module by module, using the CSS2.1 specification as its core. Each module adds functionality and/or replaces part of the CSS2.1 specification. The CSS Working Group intends that the new CSS modules will not contradict the CSS2.1 specification: only that they will add functionality and refine definitions

From this level on modules are leveled independently

The working group decided to no more maintain only one Specification for the whole language. Instead, we have a specification per module considering the CSS2.1 (or the CSS2.2) as the core one.

That's why we can find: CSS Flexible Box Layout Module Level 1, CSS Grid Layout Module Level 1, Selectors Level 3, Selectors Level 4, etc.

Find all of them here: https://www.w3.org/TR/?tag=css

An illustration to understand the logic of CSS Level 3

CSS3

To summarize, CSS3 (or CSS Level 3) is a set of different specifications (each one related to a module) plus the "CSS2.2 Specification" as the core one.

Many of us think that CSS3 is a language on its own but it's not. The language is CSS. CSS3 is only one level of CSS that defines how the specifications should be organized.

Let's hope people will stop saying: "I am experienced in CSS3" because it doesn't make a lot of sense.

CSS Level 4

I think now it's clear why there is no CSS4.

There is no CSS Level 4. Independent modules can reach level 4 or beyond, but CSS the language no longer has levels. ("CSS Level 3" as a term is used only to differentiate it from the previous monolithic versions.)

Let's stop the debate around CSS2, CSS3, CSS4, etc. CSS is simply CSS and it contains different modules that level up independently.

You may have a good experience using Flexbox but not using CSS Grid, you may know very well CSS selectors but you have no idea what is CSS masking, etc so please no more "I have a good knowledge of CSS3".

Top comments (15)

Collapse
 
typo3freelancer profile image
Simon Köhler

Some people say CSS is disgusting or a problem. Well I think it depends on your personal preference. Since SASS I really love it more than PHP coding... sometimes. CSS is awesome and no matter what version, you gotta learn it all anyways ;-)

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

css is not a programming language so it's not suitable to comparison against php, js, java or others. But you can compare the way we add styling to our websites (css) with the way we style desktop or mobile Apps, in which case I definitely like CSS but hey, i'm a senior web dev with poor experience on Android and zero experience on iOS so... don't take my opinion too serious :D

Collapse
 
typo3freelancer profile image
Simon Köhler

Hey mister senior super educated master: Don't you understand the meaning of "I really love it more than PHP coding"? I put my first website online in 2002...

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇

Haha sorry it's just that I'm used to comparisons between two things of the same... category or context, that's all, so from your words I understand you preferred to build layouts instead on coding functionalities isn't it?

Thread Thread
 
typo3freelancer profile image
Simon Köhler

No, I like both but I hate pure CSS ;-) I love pure PHP ;-)

Collapse
 
alvaromontoro profile image
Alvaro Montoro

I've seen job postings asking for CSS4 experience (probably a confused recruiter with the Level 4) :P

Collapse
 
afif profile image
Temani Afif

Or maybe it's a "trap" to filter all the candidates that will automatically say "Yes I am experienced with CSS 4" ;)

Collapse
 
ben profile image
Ben Halpern

😅

Collapse
 
jwp profile image
John Peters

Perhaps they should change their way of thinking.

The biggest problem in web development today is having to deal with CSS. So much so, that entire libraries and industries have been made because of it.

  • SCSS
  • Tailwind
  • Bootstrap
  • The new flavor of the week

CSS is a DSL only; it's not a real language,

  • It doesn't compile
  • It has no error checking, except through 3rd party IDE tools built on language services.
  • It is unable to use refactor technology.
  • It took over 10 years to come up with a grid system.
  • It only recently introduced variables
  • Too slow to implement new stuff

CSS to me is disgusting, but thanks to SCSS it's tolerable.

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

True my friend, there are many tools around CSS and the points you made are all true.. . I agree with all of them except on the following;

There's no real need to check errors if you can't make errors (I mean, it's all declarative sentences and all of them will be painted or overwritten).

The "refactoring" thing on CSS it's a search and replace thing (which scss handles well with variables and so and must be included in native CSS standards on a near future to ensure the correct evolution of the styling language).

I'm OK with the timings to implement new stuff after being able to use flex on any browser... most time the issue is from designers part where they don't know CSS so they make graphic design instead web design so you'll need to take weird workarounds to implement things that could be designed well for web from the beginning.

It is (I think), like all things a matter of insight. If you dig deep on CSS you'll be experienced enough to know exactly what to do to achieve something and what to do to solve or refactor something so it will be more pleasant, the same thing happen with any given language or programming language isn't it?

At this point you can blame some browsers (cough Safari cough IE cough) to not implement the standards or features and to not give support to new definitions before being standards as Chrome does (for example).

Collapse
 
jwp profile image
John Peters

Yes, insight, lots of study and being an artist. The artistry part manifests itself only after understanding browser behaviors which comes after practicing, lots of practicing.

Collapse
 
ubbcou profile image
ubbcou

learned!

Collapse
 
sufyan331 profile image
sufyan yaan

I feel worry if I am lating to go to find out. But well, it's entertaining me.

Collapse
 
icecoffee profile image
Atulit Anand

In some other reality with positive and for availability of CSS4
CSS1 mehh..
CSS2 ok
CSS3 Dang
CSS4 GTFO mate I'm still exploring this one

Collapse
 
naren67 profile image
naren67

nah