Package org.vaadin.firitin.util
Class VStyleUtil
java.lang.Object
org.vaadin.firitin.util.VStyleUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interfaceVStyleUtil.ThemeStyle<T extends Enum<T>> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Enum<T>>
voidapplyOrElse(VStyleUtil.ThemeStyle<T> value, VStyleUtil.ThemeStyle<T> defaultValue, com.vaadin.flow.component.HasElement component) static voidstatic voidinjectAsFirst(String css) Injects given CSS to the beginning of the head element, so it can be overridden by other styles without strong selectors.static voidsetFlexDirection(com.vaadin.flow.component.HasStyle component, VStyleUtil.FlexDirection direction) static voidsetFlexShrink(double shrink, com.vaadin.flow.component.HasStyle component)
-
Method Details
-
inject
-
injectAsFirst
Injects given CSS to the beginning of the head element, so it can be overridden by other styles without strong selectors.- Parameters:
css- the CSS to inject
-
applyOrElse
public static <T extends Enum<T>> void applyOrElse(VStyleUtil.ThemeStyle<T> value, VStyleUtil.ThemeStyle<T> defaultValue, com.vaadin.flow.component.HasElement component) -
setFlexShrink
public static void setFlexShrink(double shrink, com.vaadin.flow.component.HasStyle component) -
setFlexDirection
public static void setFlexDirection(com.vaadin.flow.component.HasStyle component, VStyleUtil.FlexDirection direction)
-