Another great video by Kevin Powell on one of those things in CSS that many may have heard of, but most likely don’t understand entirely (I know I didn’t for a very long time 😅).
We often think initial sets something back to how it started, but it actually does a lot more than that. Often, we’re looking for unset or revert instead.
The gist of the video is written down in this Twitter thread:
A lot of people think that `initial` will set things back to the default that we started with but it actually is a lot more extreme than that.
For example `display: initial` will always result in `inline`!
A lot to cover here, so if you want to know more, it's thread time 👇 pic.twitter.com/YcNJX4ViBN
— Kevin Powell (@KevinJPowell) September 23, 2021