Interface CssPropertyEnum

All Known Implementing Classes:
AuraProps, LumoProps, VaadinCssProps

public interface CssPropertyEnum
Interface for CSS property enums providing shared default methods for working with CSS custom properties (design tokens).

Each implementing enum only needs to provide cssPrefix() returning its CSS variable prefix (e.g. "--aura-").

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the CSS variable prefix, e.g.
    default void
    define(com.vaadin.flow.component.Component scope, String value)
    Defines (sets) this CSS property on the given component's inline style.
    default void
    define(String value)
    Defines (sets) this CSS property globally on the document root element.
    default String
    Returns the full CSS custom property name, e.g.
    Provided by the enum itself.
    default String
    var()
    Returns a var(--...) reference to this CSS property.
  • Method Details

    • name

      String name()
      Provided by the enum itself.
    • cssPrefix

      String cssPrefix()
      Returns the CSS variable prefix, e.g. "--aura-".
    • getCssName

      default String getCssName()
      Returns the full CSS custom property name, e.g. "--aura-base-color".
    • define

      default void define(com.vaadin.flow.component.Component scope, String value)
      Defines (sets) this CSS property on the given component's inline style.
    • define

      default void define(String value)
      Defines (sets) this CSS property globally on the document root element.
    • var

      default String var()
      Returns a var(--...) reference to this CSS property.