This content originally appeared on Bram.us and was authored by Bramus!
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
This content originally appeared on Bram.us and was authored by Bramus!
Bramus! | Sciencx (2021-09-27T21:54:49+00:00) CSS initial doesn’t do what you think it does. Retrieved from https://www.scien.cx/2021/09/27/css-initial-doesnt-do-what-you-think-it-does/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.