The problem with CSS versioning
Published on 2019-01-18 18:00My first version of CSS was 2 and the latest CSS version is 3 which was kind of released in early 2010's. And since then we are to some degree stuck with it even though CSS from 2018 is a lot more capable than CSS from 2012.
Currently W3C divides CSS into modules, Box Model, Selectors, Animations, etc. and each module has its own version, level. So on one hand we have modules that are on Level 1 as Candidate Recommendation, Grid Layout module which has also Working Draft for Level 2, and on the other modules such as Selectors are currently on Level 3 as Recommendation and Level 4 as Working Draft. As a developer who likes to follow standards development it makes perfect sense but to a Java developer who decided to give Front-end development a try (or was thrown into it) it can be confusing.
Note for Front-end developers: In back-end development developers don't have to take into account as much environmental fluidity as there is on Front-end. There's always a specific version of a compiler and a runtime environment. There's no need to support in production several versions of runtime environment from several vendors.
With CSS we could, officially or not, do something similar. There are several options how to do it because some modules are implemented before they are finalized:
- CSS 20XY is all specifications that reached Recommendation level in that year
- CSS 20XY is all specifications that reached Candidate Recommendation and at least N major browsers implemented them in that year
- CSS 20XY is all specifications that were implemented by major browser and percentage of users who can benefit from them reached to at least 80% that year
Third option is the most radical and relies on browser vendors rather than the specification. To the outside world, including back-end developers, is probably the easiest to communicate. Also 80% is an arbitrary number which can be discussed.
Second option is a compromise which feels the most confusing as it opens a discussion to what is a major browser. In some contexts Internet Explorer is still a major browser, in others IE and Edge are marginal browsers.
There is a somewhat heated discussion on Twitter about this topic and I wanted to throw my $.02 into the discussion in the long form.