Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 23, 2021 11:06 am GMT

When will we have CSS4?

Never! There will be no V4 release of CSS.

What??

Said like that it sounds a bit strange but don't worry, 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 obselete

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.

Obselete doesn't mean that what is defined at that time is now wrong or no more used. If you follow the link of 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 intresting here with CSS2 that 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 revision here: https://www.w3.org/TR/CSS22/changes.html. You will see that it's more about clarifying and updating 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 levelled 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 languange is CSS. CSS3 is only one level of CSS that define 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 but please no more "I have a good knowledge of CSS3".


Original Link: https://dev.to/afif/when-we-will-have-css4-o9o

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To