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-origintranslateResponsive Design
Media Queries
Whirl media queries use the root VisualElement’s size (not the screen size).This allows the system to work consistently in:
- UI Toolkit Custom Editor Windows
- Runtime Canvas/PanelSettings
- Nested VisualElements (e.g., inside ScrollViews, Tabs, etc.)
- Embedded UI layouts (e.g., in 3D world space)
Breakpoints are defined in the Theme ScriptableObject using CSS-like variables:
--breakpoint-sm: 250px
--breakpoint-md: 600px
--breakpoint-lg: 900px
--breakpoint-xl: 1200pxCheck the theme section for more details on setting up themes.
Example Media Query Usage:
C#/ScriptableObjects
md:bg-red
lg:bg-aquaUXML
md---bg-red
lg---bg-aquaOrientative Queries
These can be combined with media queries for more specific styling rules.
pt:hover:sm:bg-black