--- title: all slug: Web/CSS/all translation_of: Web/CSS/all ---
The all
CSS shorthand property sets all of an element's properties (other than {{cssxref("unicode-bidi")}} and {{cssxref("direction")}}) to their initial or inherited values, or to the values specified in another stylesheet origin..
/* Global values */ all: initial; all: inherit; all: unset; /* CSS Cascading and Inheritance Level 4 */ all: revert;
{{cssinfo}}
The all
property is specified as one of the CSS global keyword values. Note that none of these values affect the {{cssxref("unicode-bidi")}} and {{cssxref("direction")}} properties.
unset
.revert
, the Author origin includes the Override and Animation origins.<blockquote id="quote"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </blockquote> Phasellus eget velit sagittis.
body { font-size: small; background-color: #F0F0F0; color: blue; } blockquote { background-color: skyblue; color: red; }
all
propertyThe {{HTMLElement("blockquote")}} uses the browser's 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:unset
The {{HTMLElement("blockquote")}} doesn't use the browser default styling: it is an inline element now (initial value), its {{cssxref("background-color")}} is transparent
(initial value), but its {{cssxref("font-size")}} is still small
(inherited value) and its {{cssxref("color")}} is blue
(inherited value).
all:initial
The {{HTMLElement("blockquote")}} doesn't use the browser default styling: it is an inline element now (initial value), its {{cssxref("background-color")}} is transparent
(initial value), its {{cssxref("font-size")}} is normal
(initial value) and its {{cssxref("color")}} is black
(initial value).
all:inherit
The {{HTMLElement("blockquote")}} doesn't use the browser default styling: it is a block element now (inherited value from its containing {{HTMLElement("body")}} element), its {{cssxref("background-color")}} is #F0F0F0
(inherited value), its {{cssxref("font-size")}} is small
(inherited value) and its {{cssxref("color")}} is blue
(inherited value).
Specification | Status | Comment |
---|---|---|
{{ SpecName('CSS4 Cascade', '#all-shorthand', 'all') }} | {{ Spec2('CSS4 Cascade') }} | Added the revert value. |
{{ SpecName('CSS3 Cascade', '#all-shorthand', 'all') }} | {{ Spec2('CSS3 Cascade') }} | Initial definition. |
{{Compat("css.properties.all")}}
CSS global keyword values: {{cssxref("initial")}}, {{cssxref("inherit")}}, {{cssxref("unset")}}, {{cssxref("revert")}}