Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


USS properties reference

List of all USS properties, whether they're inherited and their animatability.
Read time 1 minuteLast updated 22 days ago

The following table lists the USS properties in UI Toolkit.
The table indicates which properties are inherited and their animatability. For an inherited property, the element gets the value from its parent element if you don't specify a value for it. The following example uses an inherited property to set the font for all elements.
:root { -unity-font: resource("Font/consola.ttf");}
Click the property name to see detailed information about that property.
Note
The usage of a USS property that's the same as the CSS property links to the Mozilla developer documentation.

Property

Inherited

Animatability

Description

align-content
NoDiscreteAlignment of the whole area of children on the cross axis if they span over multiple lines in this container.
align-items
NoDiscreteAlignment of children on the cross axis of this container.
align-self
NoDiscreteSimilar to align-items, but only for this specific element.
all
NoFully animatableAllows resetting all properties with the initial keyword. Does not apply to custom USS properties.
animation-play-state
NoNon-animatableControls whether the animation is running or paused.
aspect-ratio
NoFully animatableSets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions.
backdrop-filter
NoFully animatableFilter effects to apply to the area behind the element.
background-color
NoFully animatableBackground color to paint in the element's box.
background-image
NoDiscreteBackground image to paint in the element's box.
background-position
NoFully animatableBackground image position value.
background-position-x
NoDiscreteBackground image x position value.
background-position-y
NoDiscreteBackground image y position value.
background-repeat
NoDiscreteBackground image repeat value.
background-size
NoFully animatableBackground image size value. Transitions are fully supported only when using size in pixels or percentages, such as pixel-to-pixel or percentage-to-percentage transitions.
border-bottom-color
NoFully animatableColor of the element's bottom border.
border-bottom-left-radius
NoFully animatableThe radius of the bottom-left corner when a rounded rectangle is drawn in the element's box.
border-bottom-right-radius
NoFully animatableThe radius of the bottom-right corner when a rounded rectangle is drawn in the element's box.
border-bottom-width
NoFully animatableSpace reserved for the bottom edge of the border during the layout phase.
border-color
NoFully animatableShorthand for border-top-color, border-right-color, border-bottom-color, border-left-color
border-left-color
NoFully animatableColor of the element's left border.
border-left-width
NoFully animatableSpace reserved for the left edge of the border during the layout phase.
border-radius
NoFully animatableShorthand for border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius
border-right-color
NoFully animatableColor of the element's right border.
border-right-width
NoFully animatableSpace reserved for the right edge of the border during the layout phase.
border-top-color
NoFully animatableColor of the element's top border.
border-top-left-radius
NoFully animatableThe radius of the top-left corner when a rounded rectangle is drawn in the element's box.
border-top-right-radius
NoFully animatableThe radius of the top-right corner when a rounded rectangle is drawn in the element's box.
border-top-width
NoFully animatableSpace reserved for the top edge of the border during the layout phase.
border-width
NoFully animatableShorthand for border-top-width, border-right-width, border-bottom-width, border-left-width
bottom
NoFully animatableBottom distance from the element's box during layout.
color
YesFully animatableColor to use when drawing the text of an element.
cursor
NoDiscreteMouse cursor to display when the mouse pointer is over an element.
display
NoNon-animatableDefines how an element is displayed in the layout.
filter
NoFully animatableFilter effects to apply to the element.
flex
NoFully animatableShorthand for flex-grow, flex-shrink, flex-basis
flex-basis
NoFully animatableInitial main size of a flex item, on the main flex axis. The final layout might be smaller or larger, according to the flex shrinking and growing determined by the other flex properties.
flex-direction
NoDiscreteDirection of the main axis to layout children in a container.
flex-grow
NoFully animatableSpecifies how the item will grow relative to the rest of the flexible items inside the same container.
flex-shrink
NoFully animatableSpecifies how the item will shrink relative to the rest of the flexible items inside the same container.
flex-wrap
NoDiscretePlacement of children over multiple lines if not enough space is available in this container.
font-size
YesFully animatableFont size to draw the element's text, specified in point size.
height
NoFully animatableFixed height of an element for the layout.
justify-content
NoDiscreteJustification of children on the main axis of this container.
left
NoFully animatableLeft distance from the element's box during layout.
letter-spacing
YesFully animatableIncreases or decreases the space between characters.
margin
NoFully animatableShorthand for margin-top, margin-right, margin-bottom, margin-left
margin-bottom
NoFully animatableSpace reserved for the bottom edge of the margin during the layout phase.
margin-left
NoFully animatableSpace reserved for the left edge of the margin during the layout phase.
margin-right
NoFully animatableSpace reserved for the right edge of the margin during the layout phase.
margin-top
NoFully animatableSpace reserved for the top edge of the margin during the layout phase.
max-height
NoFully animatableMaximum height for an element, when it is flexible or measures its own size.
max-width
NoFully animatableMaximum width for an element, when it is flexible or measures its own size.
min-height
NoFully animatableMinimum height for an element, when it is flexible or measures its own size.
min-width
NoFully animatableMinimum width for an element, when it is flexible or measures its own size.
opacity
NoFully animatableSpecifies the transparency of an element and of its children.
overflow
NoDiscreteHow a container behaves if its content overflows its own box.
padding
NoFully animatableShorthand for padding-top, padding-right, padding-bottom, padding-left
padding-bottom
NoFully animatableSpace reserved for the bottom edge of the padding during the layout phase.
padding-left
NoFully animatableSpace reserved for the left edge of the padding during the layout phase.
padding-right
NoFully animatableSpace reserved for the right edge of the padding during the layout phase.
padding-top
NoFully animatableSpace reserved for the top edge of the padding during the layout phase.
position
NoDiscreteElement's positioning in its parent container.
right
NoFully animatableRight distance from the element's box during layout.
rotate
NoFully animatableA rotation transformation.
scale
NoFully animatableA scaling transformation.
text-overflow
NoDiscreteThe element's text overflow mode.
text-shadow
YesFully animatableDrop shadow of the text.
top
NoFully animatableTop distance from the element's box during layout.
transform-origin
NoFully animatableThe transformation origin is the point around which a transformation is applied.
transition
NoNon-animatableShorthand for transition-delay, transition-duration, transition-property, transition-timing-function
transition-delay
NoNon-animatableDuration to wait before starting a property's transition effect when its value changes.
transition-duration
NoNon-animatableTime a transition animation should take to complete.
transition-property
NoNon-animatableProperties to which a transition effect should be applied.
transition-timing-function
NoNon-animatableDetermines how intermediate values are calculated for properties modified by a transition effect.
translate
NoFully animatableA translate transformation.
-unity-animation-clip
NoNon-animatableAnimation to apply with the current element as root.
-unity-background-image-tint-color
NoFully animatableTinting color for the element's backgroundImage.
-unity-background-scale-mode
NoDiscreteBackground image scaling in the element's box.
-unity-editor-text-rendering-mode
YesNon-animatableTextElement editor rendering mode.
-unity-font
YesDiscreteFont to draw the element's text, defined as a Font object.
-unity-font-definition
YesDiscreteFont to draw the element's text, defined as a FontDefinition structure. It takes precedence over
-unity-font
.
-unity-font-style
YesDiscreteFont style and weight (normal, bold, italic) to draw the element's text.
-unity-material
YesFully animatableCustom material to use on the element.
-unity-overflow-clip-box
NoDiscreteSpecifies which box the element content is clipped against.
-unity-paragraph-spacing
YesFully animatableIncreases or decreases the space between paragraphs.
-unity-slice-bottom
NoFully animatableSize of the 9-slice's bottom edge when painting an element's background image.
-unity-slice-left
NoFully animatableSize of the 9-slice's left edge when painting an element's background image.
-unity-slice-right
NoFully animatableSize of the 9-slice's right edge when painting an element's background image.
-unity-slice-scale
NoFully animatableScale applied to an element's slices.
-unity-slice-top
NoFully animatableSize of the 9-slice's top edge when painting an element's background image.
-unity-slice-type
NoDiscreteSpecifies the type of sclicing.
-unity-text-align
YesDiscreteHorizontal and vertical text alignment in the element's box.
-unity-text-auto-size
YesNon-animatableOverrides any explicit font-size to scale text within the defined minimum and maximum bounds, recalculating as needed to fit its container.
-unity-text-generator
YesNon-animatableSwitches between Unity's standard and advanced text generator
-unity-text-outline
NoFully animatableOutline width and color of the text.
-unity-text-outline-color
YesFully animatableOutline color of the text.
-unity-text-outline-width
YesFully animatableOutline width of the text.
-unity-text-overflow-position
NoDiscreteThe element's text overflow position.
visibility
YesDiscreteSpecifies whether or not an element is visible.
white-space
YesDiscreteWord wrap over multiple lines if not enough space is available to draw the text of an element.
width
NoFully animatableFixed width of an element for the layout.
word-spacing
YesFully animatableIncreases or decreases the space between words.