Version: 2021.3
USS properties data types
USS properties syntax

USS properties reference

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.

プロパティ Inherited Animatability 説明
align-content いいえ Discrete Alignment of the whole area of children on the cross axis if they span over multiple lines in this container.
align-items いいえ Discrete Alignment of children on the cross axis of this container.
align-self いいえ Discrete Similar to align-items, but only for this specific element.
all いいえ Fully animatable Allows resetting all properties with the initial keyword. Does not apply to custom USS properties.
background-color いいえ Fully animatable Background color to paint in the element’s box.
background-image いいえ Discrete Background image to paint in the element’s box.
border-bottom-color いいえ Fully animatable Color of the element’s bottom border.
border-bottom-left-radius いいえ Fully animatable The radius of the bottom-left corner when a rounded rectangle is drawn in the element’s box.
border-bottom-right-radius いいえ Fully animatable The radius of the bottom-right corner when a rounded rectangle is drawn in the element’s box.
border-bottom-width いいえ Fully animatable Space reserved for the bottom edge of the border during the layout phase.
border-color いいえ Fully animatable Shorthand for border-top-color, border-right-color, border-bottom-color, border-left-color
border-left-color いいえ Fully animatable Color of the element’s left border.
border-left-width いいえ Fully animatable Space reserved for the left edge of the border during the layout phase.
border-radius いいえ Fully animatable Shorthand for border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius
border-right-color いいえ Fully animatable Color of the element’s right border.
border-right-width いいえ Fully animatable Space reserved for the right edge of the border during the layout phase.
border-top-color いいえ Fully animatable Color of the element’s top border.
border-top-left-radius いいえ Fully animatable The radius of the top-left corner when a rounded rectangle is drawn in the element’s box.
border-top-right-radius いいえ Fully animatable The radius of the top-right corner when a rounded rectangle is drawn in the element’s box.
border-top-width いいえ Fully animatable Space reserved for the top edge of the border during the layout phase.
border-width いいえ Fully animatable Shorthand for border-top-width, border-right-width, border-bottom-width, border-left-width
bottom いいえ Fully animatable Bottom distance from the element’s box during layout.
color はい Fully animatable Color to use when drawing the text of an element.
cursor いいえ Non-animatable Mouse cursor to display when the mouse pointer is over an element.
display いいえ Discrete Defines how an element is displayed in the layout.
flex いいえ Fully animatable Shorthand for flex-grow, flex-shrink, flex-basis
flex-basis いいえ Fully animatable Initial 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 いいえ Discrete Direction of the main axis to layout children in a container.
flex-grow いいえ Fully animatable Specifies how the item will shrink relative to the rest of the flexible items inside the same container.
flex-shrink いいえ Fully animatable Specifies how the item will shrink relative to the rest of the flexible items inside the same container.
flex-wrap いいえ Discrete Placement of children over multiple lines if not enough space is available in this container.
font-size はい Fully animatable Font size to draw the element’s text.
height いいえ Fully animatable Fixed height of an element for the layout.
justify-content いいえ Discrete Justification of children on the main axis of this container.
left いいえ Fully animatable Left distance from the element’s box during layout.
letter-spacing はい Fully animatable Increases or decreases the space between characters.
margin いいえ Fully animatable Shorthand for margin-top, margin-right, margin-bottom, margin-left
margin-bottom いいえ Fully animatable Space reserved for the bottom edge of the margin during the layout phase.
margin-left いいえ Fully animatable Space reserved for the left edge of the margin during the layout phase.
margin-right いいえ Fully animatable Space reserved for the right edge of the margin during the layout phase.
margin-top いいえ Fully animatable Space reserved for the top edge of the margin during the layout phase.
max-height いいえ Fully animatable Maximum height for an element, when it is flexible or measures its own size.
max-width いいえ Fully animatable Maximum width for an element, when it is flexible or measures its own size.
min-height いいえ Fully animatable Minimum height for an element, when it is flexible or measures its own size.
min-width いいえ Fully animatable Minimum width for an element, when it is flexible or measures its own size.
opacity いいえ Fully animatable Specifies the transparency of an element and of its children.
overflow いいえ Discrete How a container behaves if its content overflows its own box.
padding いいえ Fully animatable Shorthand for padding-top, padding-right, padding-bottom, padding-left
padding-bottom いいえ Fully animatable Space reserved for the bottom edge of the padding during the layout phase.
padding-left いいえ Fully animatable Space reserved for the left edge of the padding during the layout phase.
padding-right いいえ Fully animatable Space reserved for the right edge of the padding during the layout phase.
padding-top いいえ Fully animatable Space reserved for the top edge of the padding during the layout phase.
position いいえ Discrete Element’s positioning in its parent container.
right いいえ Fully animatable Right distance from the element’s box during layout.
rotate いいえ Fully animatable A rotation transformation.
scale いいえ Fully animatable A scaling transformation.
text-overflow いいえ Discrete The element’s text overflow mode.
text-shadow はい Fully animatable Drop shadow of the text.
top いいえ Fully animatable Top distance from the element’s box during layout.
transform-origin いいえ Fully animatable The transformation origin is the point around which a transformation is applied.
transition いいえ Non-animatable Shorthand for transition-delay, transition-duration, transition-property, transition-timing-function
transition-delay いいえ Non-animatable Duration to wait before starting a property’s transition effect when its value changes.
transition-duration いいえ Non-animatable Time a transition animation should take to complete.
transition-property いいえ Non-animatable Properties to which a transition effect should be applied.
transition-timing-function いいえ Non-animatable Determines how intermediate values are calculated for properties modified by a transition effect.
translate いいえ Fully animatable A translate transformation.
-unity-background-image-tint-color いいえ Fully animatable Tinting color for the element’s backgroundImage.
-unity-background-scale-mode いいえ Discrete Background image scaling in the element’s box.
-unity-font はい Discrete Font to draw the element’s text, defined as a Font object.
-unity-font-definition はい Discrete Font to draw the element’s text, defined as a FontDefinition structure. It takes precedence over -unity-font.
-unity-font-style はい Discrete Font style and weight (normal, bold, italic) to draw the element’s text.
-unity-overflow-clip-box いいえ Discrete Specifies which box the element content is clipped against.
-unity-paragraph-spacing はい Fully animatable Increases or decreases the space between paragraphs.
-unity-slice-bottom いいえ Fully animatable Size of the 9-slice’s bottom edge when painting an element’s background image.
-unity-slice-left いいえ Fully animatable Size of the 9-slice’s left edge when painting an element’s background image.
-unity-slice-right いいえ Fully animatable Size of the 9-slice’s right edge when painting an element’s background image.
-unity-slice-scale いいえ Fully animatable Scale applied to an element’s slices.
-unity-slice-top いいえ Fully animatable Size of the 9-slice’s top edge when painting an element’s background image.
-unity-text-align はい Discrete Horizontal and vertical text alignment in the element’s box.
-unity-text-outline いいえ Fully animatable Outline width and color of the text.
-unity-text-outline-color はい Fully animatable Outline color of the text.
-unity-text-outline-width はい Fully animatable Outline width of the text.
-unity-text-overflow-position いいえ Discrete The element’s text overflow position.
visibility はい Discrete Specifies whether or not an element is visible.
white-space はい Discrete Word wrapping over multiple lines if not enough space is available to draw the text of an element.
width いいえ Fully animatable Fixed width of an element for the layout.
word-spacing はい Fully animatable Increases or decreases the space between words.
USS properties data types
USS properties syntax