Interface CssDefaultValue
- All Known Implementing Classes:
ECssAlignItems,ECssBackgroundRepeat,ECssBoxSizing,ECssCursor,ECssDisplay,ECssJustifyContent,ECssOverflow,ECssPointerEvent,ECssPosition,ECssTextAlign,ECssTranformOrigin
- Author:
- XIMA MEDIA GmbH
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTheinheritCSS keyword causes the element to take the computed value of the property from its parent element.static final StringTheinitialCSS keyword applies the initial (or default) value of a property to an element.static final StringTherevertCSS keyword reverts the cascaded value of the property from its current value to the value the property would have had if no changes had been made by the current style origin to the current element.static final StringTherevert-layer CSS keyword rolls back the value of a property in a cascade layer to the value of the property in a CSS rule matching the element in a previous cascade layer.static final StringTheunsetCSS keyword resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.
-
Field Details
-
INHERIT
TheinheritCSS keyword causes the element to take the computed value of the property from its parent element. It can be applied to any CSS property, including the CSS shorthand propertyall.For inherited properties, this reinforces the default behavior, and is only needed to override another rule.
- See Also:
-
INITIAL
TheinitialCSS keyword applies the initial (or default) value of a property to an element. It can be applied to any CSS property, including the CSS shorthand propertyall. Withallset toinitial, all CSS properties can be restored to their respective initial values in one go instead of restoring each one separately.On inherited properties, the initial value may be unexpected. You should consider using the
inherit,unset,revert, orrevert-layerkeywords instead.- See Also:
-
REVERT
TherevertCSS keyword reverts the cascaded value of the property from its current value to the value the property would have had if no changes had been made by the current style origin to the current element. Thus, it resets the property to its inherited value if it inherits from its parent or to the default value established by the user agent's stylesheet (or by user styles, if any exist). It can be applied to any CSS property, including the CSS shorthand propertyall.This keyword removes from the cascade all of the styles that have been overridden until the style being rolled back to is reached.
- If used by a site's own styles (the author origin),
revertrolls back the property's cascaded value to the user's custom style, if one exists; otherwise, it rolls the style back to the user agent's default style. - If used in a user's custom stylesheet, or if the style was applied by the user (the user origin),
revertrolls back the cascaded value to the user agent's default style. - If used within the user agent's default styles, this keyword is functionally equivalent to
unset.
revertkeyword works exactly the same asunsetin many cases. The only difference is for properties that have values set by the browser or by custom stylesheets created by users (set on the browser side).Revert will not affect rules applied to children of an element you reset (but will remove effects of a parent rule on a child). So if you have a
color: greenfor all sections andall: reverton a specific section, the color of the section will be black. But if you have a rule to make all paragraphs red, then all paragraphs will still be red in all sections.- See Also:
- If used by a site's own styles (the author origin),
-
REVERT_LAYER
Therevert-layer CSS keyword rolls back the value of a property in a cascade layer to the value of the property in a CSS rule matching the element in a previous cascade layer. The value of the property with this keyword is recalculated as if no rules were specified on the target element in the current cascade layer.If there is no other cascade layer to revert to for the matching CSS rule, the property value rolls back to the computed value derived from the current layer. Furthermore, if there is no matching CSS rule in the current layer, the property value for the element rolls back to the style defined in a previous style origin.
This keyword can be applied to any CSS property, including the CSS shorthand property
all.- See Also:
-
UNSET
TheunsetCSS keyword resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. In other words, it behaves like theinheritkeyword in the first case, when the property is an inherited property, and like theinitialkeyword in the second case, when the property is a non-inherited property.unsetcan be applied to any CSS property, including the CSS shorthand propertyall.- See Also:
-