Class StyleVariantConfig
java.lang.Object
com.inductiveautomation.perspective.common.config.styles.StyleVariantConfig
A style variant is one style or animated style, which might serve as the base style for a Style Class or as
 a media-query or pseudo-selector variant style.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThis is the style block + animation settings for animated styles.This will be non-null if this style variant is a media-query varient.This will be non-null if this style variant is a pseudo-selector variant.This is the style block for this variant for non-animated styles.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidappend(StringBuilder css, String className, Integer variantIndex) Compile this style to CSS format.booleanbooleanboolean
- 
Field Details- 
pseudoThis will be non-null if this style variant is a pseudo-selector variant.
- 
mediaThis will be non-null if this style variant is a media-query varient.
- 
styleThis is the style block for this variant for non-animated styles.
- 
animationThis is the style block + animation settings for animated styles.
 
- 
- 
Constructor Details- 
StyleVariantConfigpublic StyleVariantConfig()
- 
StyleVariantConfig
 
- 
- 
Method Details- 
isDefaultStylepublic boolean isDefaultStyle()
- 
isAnimatedpublic boolean isAnimated()
- 
equals
- 
appendpublic void append(@Nonnull StringBuilder css, @Nonnull String className, @Nullable Integer variantIndex) Compile this style to CSS format.For example, let's say we have the following style represented by its serialized JSON format: Resource "A": 
 The output of this method will compile this style to CSS. The CSS class name is equal to the style project resource name prepended with "psc-":{ "declarations": { "paddingTop": "10em", "borderColor": "red" } }.psc-A:in-range { border-color: red; }- Parameters:
- className- The name of the CSS class to generate
- variantIndex- The index of this variant in the parent style class, or null if this is the base variant
 
 
-