all

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.

Comparison

Below is the test element in its standard styles. We’re going to change it by using the all declaration.

This is a test element.

If the tests below have a border and grey background, all is not supported.

inherit

This is the test element with all: inherit

It should have a wildly weird margin/padding because the body has one.

initial

This is the test element with all: initial

It should have black text that’s slightly larger than on the rest of the page.

unset

This is the test element with all: unset

It should be blue, without borders or backgrounds.