{"id":203111,"date":"2015-06-04T08:38:47","date_gmt":"2015-06-04T15:38:47","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=203111"},"modified":"2018-09-06T06:30:20","modified_gmt":"2018-09-06T13:30:20","slug":"all","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/a\/all\/","title":{"rendered":"all"},"content":{"rendered":"
The The point of it is allowing for component-level resetting of styles. Sometimes it’s far easier to start from scratch with styling rather than fight against everything that is already there.<\/p>\n A few properties do not have an initial value explicitly defined in the spec and instead allow the user agent to set the initial value — See the CSS tab for comments that indicate which properties are inheritable. Notice that when the See the Pen all property demo<\/a> by CSS-Tricks (@css-tricks<\/a>) on CodePen<\/a>.<\/p>\nall<\/code> property in CSS resets all of the selected element’s properties, except the
direction<\/a><\/code> and
unicode-bidi<\/a><\/code> properties that control text direction.<\/p>\n
.module {\r\n all: unset;\r\n}<\/code><\/pre>\n
Values<\/h3>\n
\n
initial<\/code>: resets all of the selected element’s properties to their initial values as defined in the CSS spec.<\/li>\n
inherit<\/code>: the selected element inherits all of its parent element’s styling, including styles that are not normally inheritable.<\/li>\n
unset<\/code>: the selected element inherits any inheritable values passed down from the parent element. If no inheritable value is available, the initial value from the CSS spec is used for each property.<\/li>\n<\/ul>\n
color<\/a><\/code> and
font-family<\/a><\/code> are two examples. If
all: initial;<\/code> or
all: unset;<\/code> is applied, the user agent default value is used as the
initial<\/code> value for these properties.<\/p>\n
all<\/code> is considered a “shorthand” property because it allows us to control the values of every<\/em> CSS property at once with a single declaration. However, unlike most shorthand properties, there is no practical “longhand” version and it has no sub-properties.<\/p>\n
Demo<\/h3>\n
inherit<\/code> value is used, the
div<\/code> inherits every<\/em> property from its parent, including it’s
width<\/code>,
padding<\/code>, and
border<\/code>, which are not normally inherited. <\/p>\n
More Information<\/h3>\n
\n
all<\/code> in the W3C CSS Cascading and Inheritance Level 4 Editor’s Draft <\/a><\/li>\n
initial<\/code> value.<\/li>\n
Browser Support<\/h3>\n