Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

all

Перевод не завершен. Пожалуйста, помогите перевести эту статью с английского.

Описание

The CSS all shorthand property resets all properties, apart from unicode-bidi and direction, to their initial or inherited value.

Начальное значениеНа практике начального значения нет
Применяется квсе элементы
Наследуетсянет
ОтображениеДля этого нет практического применения.
Обработка значениякак указанное значение, применяется к каждому свойству этой короткой записи.
Анимируемостькак каждое из подсвойств этого свойства (все свойства, кроме unicode-bidi и direction)
Канонический порядокуникальный не однозначный порядок, определённый формальной грамматикой

Синтаксис

all: initial;
all: inherit;
all: unset;

/* CSS Cascading and Inheritance Level 4 */
all: revert;

Values

initial
This keyword indicates to change all the properties applying to the element or the element's parent to their initial value. unicode-bidi and direction values are not affected.
inherit
This keyword indicates to change all the properties applying to the element or the element's parent to their parent value. unicode-bidi and direction values are not affected.
unset
This keyword indicates to change all the properties applying to the element or the element's parent to their parent value if they are inheritable or to their initial value if not. unicode-bidi and direction values are not affected.
revert
If the cascaded value of a property is the revert keyword, the behavior depends on the origin to which the declaration belongs:
user-agent origin
Equivalent to unset.
user origin
Rolls back the cascade to the user-agent level, so that the specified value is calculated as if no author-level or user-level rules were specified for this property.
author origin
Rolls back the cascade to the user level, so that the specified value is calculated as if no author-level rules were specified for this property. For the purpose of revert, this origin includes the Override and Animation origins.

Формальный синтаксис

initial | 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;
}

Результат:

No all property

The <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:unset

The <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:initial

The <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:inherit

The <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 3
Определение 'all' в этой спецификации.
Кандидат в рекомендации Initial definition.
CSS Cascading and Inheritance Level 4
Определение 'all' в этой спецификации.
Рабочий черновик Added the revert value.

Совместимость с браузерами

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 37  27 (27) Нет 24 Нет
revert Нет Нет Нет Нет 9.1
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support Нет 27.0 (27) Нет Нет Нет
revert Нет Нет Нет Нет 9.3

Смотрите также

The CSS-wide property values: initial, inherit, unset, and revert.

Метки документа и участники

 Внесли вклад в эту страницу: andreww2012
 Обновлялась последний раз: andreww2012,