Skip to content

Style properties ​

The 37 properties a .auis rule or a style="" attribute may set. The source of truth is Core/Schema/AuiSchema.cs; the "theme" column is what Theme/Default.auis sets, which is what you actually see if you set nothing.

Units are millimetres unless stated. Three flags matter:

  • Inherited — passes down to children.
  • Animatable — may appear in a :state rule and be tweened. Only these seven can.
  • Bake only — applied by the prefab builder; cannot change in-world (AUI212).

Size ​

PropertyValuesNotes
widthnumber, Nmm, N%, autopercent is of the parent's content box
heightnumber, Nmm, N%, auto
min-widthnumber, Nmm, N%, auto
min-heightnumber, Nmm, N%, auto
max-widthnumber, Nmm, N%, autothe usual fix for text that does not fit
max-heightnumber, Nmm, N%, auto

Without an explicit size an element is content-sized. See layout.

Placement ​

PropertyValuesDefaultNotes
displayflex, noneflexnone removes the element and its space
positionstatic, absolutestaticabsolute leaves the flow
anchornone, fill, top, bottom, left, right, centernoneabsolute placement against the parent; fill equals absolute with four zero edges
topnumber, Nmm, N%edge from the parent's content box, for position: absolute. May be negative
rightnumber, Nmm, N%
bottomnumber, Nmm, N%
leftnumber, Nmm, N%

Two opposite edges with no size stretch the element between them. An explicit size wins over the opposite edge (AUI403). An edge on a non-absolute element is ignored (AUI404). display or position on the root view is AUI405.

Flow ​

PropertyValuesDefaultTheme
flex-directionrow, columncolumn.row and .grid set row
justifystart, center, end, space-betweenstartmain axis
alignstart, center, end, stretchstretchcross axis; .row sets center
grownumber0spacer sets 1
wraptrue, falsefalserow containers only; .grid sets true
gapnumber0view 12, panel 8
padding1 to 4 numbers0view 16, .card 12
margin1 to 4 numbers0

padding and margin take CSS order: all, then vertical horizontal, then top horizontal bottom, then top right bottom left.

Colour and surface ​

PropertyValuesInheritedAnimatableTheme
colorcolouryesyesvar(--text)
backgroundnone, colour, sprite(N) c, material(N) c, shader(N) cyesper element
bordercolour or noneyesinput, select, modal
icon-colorcolouryesyesvar(--text)
opacitynumberyes1
scalenumberyes1
offsetx yyesfor state displacement
radiusnumberbake only; picks Rounded4/8/12/16/24

Colours: #RGB, #RGBA, #RRGGBB, #RRGGBBAA, rgb(), rgba(), transparent, white, black, or var(--name).

background combines a sprite with a material or shader: the sprite stays the texture and the colour is the vertex tint.

auis
.card  { background: sprite(Rounded8) var(--card); }
.plain { background: #1E1610; }
.none  { background: none; }
.glow  { background: sprite(Rounded8) shader(Custom/UIGlow) var(--accent); }
.hot   { background: material(GlowHot); }

shader(Name) bakes one material per shader under Assets/AUI/Generated/Materials. material(Name) uses any Material asset of that name. Materials are shared assets: a property you change on one is seen by every element using it.

opacity needs a CanvasGroup, which is added automatically for elements with an id.

Text ​

PropertyValuesInheritedTheme
fontweight size, e.g. 600 18yesview 400 18
font-weight400..700, regular, medium, semibold, boldyesbake only
font-sizenumberyes
text-alignleft, center, rightyes
line-heightnumberyesa multiplier

font sets both at once. Its weight half is bake only, its size half is not, so SetFontSize works but nothing can change a weight in-world: Udon cannot swap a font asset.

Transitions ​

PropertyValues
transitionprop duration ease, comma-separated
auis
button {
  transition: background 0.12s out-quad, color 0.12s out-quad, scale 0.1s out-back;
}

Duration is 0.12s or 120ms. all is allowed as the property. The ease defaults to out-quad. A malformed value is AUI209.

Eases ​

linear, and in- / out- / in-out- prefixed forms of:

quad, cubic, quart, sine, expo, back, bounce, elastic

That is 25 names in total. They come from VRCTween, which is inert under ClientSim, so transitions only animate in the real client.

Transitions of a view and its pages ​

PropertyValuesNotes
shownone, fade, fade-scale, fade-slideon view; bake only. The show attribute overrides it
page-transitionnone, fade, slide-left, slide-right, slide-up, slide-down, scaleon page; bake only

What may appear in a state rule ​

Only these seven, because they are the ones Udon can animate:

color, background, border, icon-color, opacity, scale, offset

Anything else in a :hover, :pressed, :selected or :disabled rule is AUI210.

auis
button:hover   { background: var(--accent); color: var(--base); scale: 1.03; }
.lift:hover    { offset: 0 -3; }
button:disabled { opacity: 0.4; }

What inherits ​

color, icon-color, font, font-weight, font-size, text-align, line-height

Setting color on a panel tints every text and icon inside it.

What is bake only ​

radius, font-weight (and the weight half of font), page-transition, show

Bindable style values ​

In a style="" attribute a declaration may be entirely {binding} tokens:

aui
<panel style="width: {progress}"/>
<panel style="offset: {x} {y}"/>
<panel style="padding: {v} {h}"/>

The C# type follows the property's kind:

KindC# type
Number, Offsetfloat
Colour, BackgroundColor
Length, Box, Enumstring

Mixing a binding with literal text (width: {n}mm) is AUI213, and sheet rules cannot contain bindings at all.

Variables ​

Declared only in a :root block, read with var(--name) or var(--name, fallback):

auis
:root { --accent: #E0A86A; --pad: 12; }
.card { padding: var(--pad); background: sprite(Rounded8) var(--card); }

Collected from every :root in tier order, so a later sheet redefining one changes every rule that reads it. Undefined is AUI203. See theming.

Next ​

  • Utility classes for the built-in star classes.
  • Styling for selectors, tiers and the cascade.
  • Layout for how the size and flow properties interact.