Interface CssDefaultValue

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String INHERIT
      The inherit CSS keyword causes the element to take the computed value of the property from its parent element.
      static String INITIAL
      The initial CSS keyword applies the initial (or default) value of a property to an element.
      static String REVERT
      The revert CSS 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 String REVERT_LAYER
      The revert-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 String UNSET
      The unset CSS keyword resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.
    • Field Detail

      • INHERIT

        static final String INHERIT
        The inherit CSS 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 property all.

        For inherited properties, this reinforces the default behavior, and is only needed to override another rule.

        See Also:
        Constant Field Values
      • INITIAL

        static final String INITIAL
        The initial CSS 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 property all. With all set to initial, 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, or revert-layer keywords instead.

        See Also:
        Constant Field Values
      • REVERT

        static final String REVERT
        The revert CSS 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 property all.

        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), revert rolls 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), revert rolls 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.
        The revert keyword works exactly the same as unset in 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: green for all sections and all: revert on 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:
        Constant Field Values
      • REVERT_LAYER

        static final String REVERT_LAYER
        The revert-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:
        Constant Field Values
      • UNSET

        static final String UNSET
        The unset CSS 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 the inherit keyword in the first case, when the property is an inherited property, and like the initial keyword in the second case, when the property is a non-inherited property.

        unset can be applied to any CSS property, including the CSS shorthand property all.

        See Also:
        Constant Field Values