Surely you have seen a CSS property and thought “Why?” For example:
Why doesn’t
z-indexwork on all elements, and why is it “-index” anyways?
Or:
Why do we need
interpolate-sizeto animate toauto?
You are not alone. CSS was born in 1996 (it can legally order a beer, you know!) and was initially considered a way to style documents; I don’t think anyone imagined everything CSS would be expected to do nearly 30 years later. If we had a time machine, many things would be done differently to match conventions or to make more sense. Heck, even the CSS Working Group admits to wanting a time-traveling contraption… in the specifications!
NOTE: If we had a time machine, this property wouldn’t need to exist.
CSS Values and Units Module Level 5, Section 10.4
If by some stroke of opportunity, I was given free rein to rename some things in CSS, a couple of ideas come to mind, but if you want more, you can find an ongoing list of mistakes made in CSS… by the CSS Working Group! Take, for example, background-repeat:
Not quite a mistake, because it was a reasonable default for the 90s, but it would be more helpful since then if
background-repeatdefaulted tono-repeat.
Right now, people are questioning if CSS Flexbox and CSS Grid should share more syntax in light of the upcoming CSS Masonry layout specifications.
Why not fix them? Sadly, it isn’t as easy as fixing something. People already built their websites with these quirks in mind, and changing them would break those sites. Consider it technical debt.
This is why I think the CSS Working Group deserves an onslaught of praise. Designing new features that are immutable once shipped has to be a nerve-wracking experience that involves inexact science. It’s not that we haven’t seen the specifications change or evolve in the past — they most certainly have — but the value of getting things right the first time is a beast of burden.
The CSSWG also maintains a wiki page with a list of things they consider a mistake: https://wiki.csswg.org/ideas/mistakes
LOL, only realized just now that the “Direct Link” button takes you there. ♂️
Haha, yes! I wonder if something new will be there in the future
They could maybe introduce some sort of flag that could be put at the start of a document to opt into a “fixed” version of CSS
@version “2025”;
A lot of folks at CSS Working Group have done a ton of work these past 30 years and I admire them a lot.
I sometimes even find myself giggling at some of their little back-and-forths on closed issues (hwb as an example) and also being in awe of their dedication and prowess towards making CSS better.
With that said, I wonder whether they’re going to deprecate rgba and hsla in the future. I also doubt that because millions of sites currently use them according to a stat I saw a little far back (2021).
There are also some issues we may encounter with new implementations of functions such as if() in the future. It’s all scary if I’m being honest, but it’s also a lovely sight to see.