If you want to reset all previously applied stylings to an element, you can use this one single CSS property:
.reset {
all: unset;
}
Copied to clipboard!
This will reset all CSS properties expect unicode-bidi
, direction
, and custom properties. This is done by setting their values to initial or inherited. It can take the following values:
.reset {
all: initial;
all: inherit;
all: unset;
}
Copied to clipboard!
Note that it is unsupported in IE.


Resources:
Remove ads📚 Get access to exclusive content
Want to get access to exclusive content? Support webtips with the price of a coffee to get access to tips, checklists, cheatsheets, and much more. ☕
Get access