The CSSall shorthand property resets all properties, apart from unicode-bidi and direction, to their initial or inherited value.
| Initial value | There is no practical initial value for it. |
|---|---|
| Applies to | all elements |
| Inherited | no |
| Media | There is no practical media for it. |
| Computed value | as the specified value applies to each property this is a shorthand for. |
| Animation type | as each of the properties of the shorthand (all properties but unicode-bidi and direction) |
| Canonical order | the unique non-ambiguous order defined by the formal grammar |
all: initial; all: inherit; all: unset; /* CSS Cascading and Inheritance Level 4 */ all: revert;
initialunicode-bidi and direction values are not affected.inheritunicode-bidi and direction values are not affected.unsetunicode-bidi and direction values are not affected.revertinitial | inherit | unset
HTML
<blockquote id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> Phasellus eget velit sagittis.
CSS
html {
font-size: small;
background-color: #F0F0F0;
color: blue;
}
blockquote {
background-color: skyblue;
color: red;
}
Results in:
all propertyThe <blockquote> uses the browsers default styling together with a specific background and text color. It also behaves as a block element: the text that follows it is beneath it.
all:unsetThe <blockquote> doesn't use the browser default styling: it is an inline element now (initial value), its background-color is transparent (initial value), but its font-size is still small (inherited value) and its color is blue (inherited value).
all:initialThe <blockquote> doesn't use the browser default styling: it is an inline element now (initial value), its background-color is transparent (initial value), its font-size is normal (initial value) and its color is black (initial value).
all:inheritThe <blockquote> doesn't use the browser default styling: it is a block element now (inherited value from its containing <div>), its background-color is transparent (inherited value), its font-size is small (inherited value) and its color is blue (inherited value).
| Specification | Status | Comment |
|---|---|---|
| CSS Cascading and Inheritance Level 4 The definition of 'all' in that specification. | Working Draft | Added the revert value. |
| CSS Cascading and Inheritance Level 3 The definition of 'all' in that specification. | Candidate Recommendation | Initial definition. |
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 37 | 27 (27) | No support | 24 | No support |
revert | No support | No support | No support | No support | 9.1 |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | No support | 27.0 (27) | No support | No support | No support |
revert | No support | No support | No support | No support | 9.3 |
The CSS-wide property values: initial, inherit, unset, and revert.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/all