Enum CSSValue.CssType

All Implemented Interfaces:
Serializable, Comparable<CSSValue.CssType>, java.lang.constant.Constable
Enclosing interface:

public static enum CSSValue.CssType extends Enum<CSSValue.CssType>
The main categories of values.
  • Enum Constant Details


      public static final CSSValue.CssType KEYWORD
      A CSS-wide keyword like inherit.
    • PROXY

      public static final CSSValue.CssType PROXY

      A vehicle towards a final value, of a CSS type that cannot be anticipated.

      Example: var() or attr().

      (note that attr() has two components, a main one whose type could be anticipated, and a fallback that could be of a different type).

    • TYPED

      public static final CSSValue.CssType TYPED
      A typed primitive value, includes numbers and identifiers.

      You can cast to CSSTypedValue (interface) or TypedValue (base implementation class).

    • LIST

      public static final CSSValue.CssType LIST
      A list of values.

      You can always cast to CSSValueList but, unless you are dealing with the argument list of a FUNCTION, it is better to cast directly to a ValueList.


      public static final CSSValue.CssType SHORTHAND
      A shorthand property.

      Declared shorthands can be retrieved from style declarations.

      Cast it to CSSShorthandValue to have access to the set of longhand property names set by the shorthand.

  • Method Details

    • values

      public static CSSValue.CssType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CSSValue.CssType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null