INTRODUCTION
IntroductionCore ConceptsGETTING STARTED
InstallationQuick startWhirl Compiler SettingsCORE CONCEPTS
Using Utility ClassesStyle FunctionsPseudo-Classes and statesResponsive DesignResponsive Base ElementThemeArbitrary ValuesLAYOUT
aspect-ratiodisplayoverflowpositionvisibilityobject-fittop / right / bottom / leftFLEXBOX
flex-basisflex-directionflex-wrapflexflex-growflex-shrinkgapjustify-contentalign-contentalign-itemsalign-selfSPACING
paddingmarginSIZING
widthmin-widthmax-widthheightmin-heightmax-heightTYPOGRAPHY
font-sizefont-styleauto-sizetext-outlineletter-spacingtext-aligncolorword-spacingparagraph-spacingtext-overflowoverflow-positionwhite-spaceBACKGROUND
background-colorbackground-imagebackground-positionbackground-repeatbackground-sizeBORDER
border-radiusborder-widthborder-colorEFFECTS
text-shadowopacityFILTER
Filterblurbrightnesscontrastgrayscalehue-rotateinvertsaturatesepiaTRANSITION
transition-propertytransition-durationtransition-timing-functiondelayTRANSFORM
rotatescaletransform-origintranslateTheme
What a Theme Contains
- Breakpoints (--breakpoint-sm, --breakpoint-md, etc.)
- Color tokens (--color-primary, --color-white, etc.)
- Spacing tokens
- Custom variables your utilities or custom components may need
- Overrides for the default theme
Everything is stored as USS-compatible variables:
--breakpoint-sm: 250px;
--breakpoint-md: 500px;
--color-primary: #00c896;Creating a Theme
If you download the asset from the Assetstore, then it should contain the default Theme, but if you clone the project from GitHub or you can't find the asset in your project, then you can go to:
Tools > WhirlUSS > Default ThemeOverrides/Custom Theme
Create > Kostom > Styles > ThemeWhy Theme Variables
You can also declare breakpoints, aspect-ratio, spacing, etc. You can also use it as a normal variable, e.g, bg-[var(--color-primary)] or background-color: var(--color-primary).
All WhirlCompilerSettings use the same theme, default or override. So, creating multiple themes for different WhirlCompilerSettings paths is not advised. All variables declared in both the default or the override theme would be added to the root of the final generated USS file.