Back to the index.
all
targets all CSS properties that can be defined for the element. You’re only allowed to set it to inherit
, initial
, or unset
. It can be useful for reset styles.
Below is the test element in its standard styles. We’re going to change it by using the all
declaration.
If the tests below have a border and grey background, all
is not supported.
all: inherit
It should have a wildly weird margin/padding because the body has one.
all: initial
It should have black text that’s slightly larger than on the rest of the page.
all: unset
It should be blue, without borders or backgrounds.