ドキュメント

Unity Engine

Download Unity

Unity Engine

USS properties reference

List of all USS properties, whether they're inherited and their animatability.
読み終わるまでの所要時間 1 分最終更新 2ヶ月前

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.
注
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
NoNon-animatableShorthand for the USS animation properties (name, duration, delay, iteration count, direction, play state). Omitting the name resets animation-name to none, as with any CSS shorthand.
animation-delay
NoNon-animatableDelay before each animation begins, in seconds. Negative values start the animation partway through its first iteration. Comma-separated to match the animation list.
animation-direction
NoNon-animatableWhether each animation plays forward, backward, or alternates direction across iterations. Comma-separated to match the animation list.
animation-duration
NoNon-animatableDuration of one iteration of each animation, in seconds. The default of 0 uses the clip's intrinsic length; a positive value remaps one iteration to that duration. Comma-separated to match the animation list.
animation-iteration-count
NoNon-animatableNumber of times each animation repeats. Use 'infinite' to loop forever. The clip's own loop flag is ignored in favor of this value. Comma-separated to match the animation list.
animation-name
NoNon-animatableAnimations to apply with the current element as root. Comma-separated to run multiple animations at once.
animation-play-state
NoNon-animatableControls whether each animation is running or paused. Comma-separated to match the animation list.
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.
box-shadow
NoFully animatableShadow cast by the element's box. Accepts horizontal and vertical offsets, an optional blur radius, an optional spread radius, an optional color, and the optional inset keyword to draw the shadow inside the border.
color
YesFully animatableColor to use when drawing the text of an element.
column-gap
NoFully animatableHorizontal space between elements.
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.
gap
NoFully animatableShorthand for row-gap and column-gap.
grid-auto-columns
NoNon-animatableSizes of implicitly-created CSS Grid columns. Only takes effect when display is set to grid.
grid-auto-flow
NoNon-animatableControls how the auto-placement algorithm flows items into a CSS Grid container. Only takes effect when display is set to grid.
grid-auto-rows
NoNon-animatableSizes of implicitly-created CSS Grid rows. Only takes effect when display is set to grid.
grid-column
NoFully animatableShorthand for grid-column-start / grid-column-end (e.g.
1 / 3
,
span 2
). Only takes effect when the element is a grid item.
grid-column-end
NoDiscreteThe 1-based column line a CSS Grid item ends on, spanning from grid-column (0 = span a single track). Only takes effect when the element is a grid item.
grid-column-start
NoDiscreteThe 1-based column line a CSS Grid item starts on (0 = auto-placement). Only takes effect when the element is a grid item.
grid-row
NoFully animatableShorthand for grid-row-start / grid-row-end (e.g.
1 / 3
,
span 2
). Only takes effect when the element is a grid item.
grid-row-end
NoDiscreteThe 1-based row line a CSS Grid item ends on, spanning from grid-row (0 = span a single track). Only takes effect when the element is a grid item.
grid-row-start
NoDiscreteThe 1-based row line a CSS Grid item starts on (0 = auto-placement). Only takes effect when the element is a grid item.
grid-template-columns
NoNon-animatableDefines the columns of a CSS Grid container as a list of track sizes. Only takes effect when display is set to grid.
grid-template-rows
NoNon-animatableDefines the rows of a CSS Grid container as a list of track sizes. Only takes effect when display is set to grid.
height
NoFully animatableFixed height of an element for the layout.
justify-content
NoDiscreteJustification of children on the main axis of this container.
justify-items
NoNon-animatableDefault justification (inline-axis alignment) of all items inside a CSS Grid container. Only takes effect when display is set to grid.
justify-self
NoNon-animatableJustification (inline-axis alignment) of a single item inside its CSS Grid cell, overriding justify-items. Only takes effect when the element is a grid item.
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.
row-gap
NoFully animatableVertical space between elements.
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-animatableDeprecated alias of animation-name. Old declarations parse as animation-name and re-serialize under the new name.
-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-curvature
NoNon-animatableBends the element's generated mesh into a curved surface around its X and/or Y axis. Accepts one or two angles: the first bends around the X axis (curving the vertical extent), the second around the Y axis (curving the horizontal extent); the sign of each selects concave or convex. Only visually meaningful on world-space panels.
-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.
z-index
NoFully animatableControls the stacking order of overlapping elements within a stacking context. The default is auto, which does not create a stacking context; any integer value creates one for the element and its descendants.