Version: 2017.3
Experimental: this API is experimental and might be changed or removed in the future.

IStyle

interface in UnityEngine.Experimental.UIElements

Switch to Manual

Description

This interface provides access to a VisualElement style data.

Reading properties from this object will read from the shared copy of style data, if multiple elements match the same USS rules. When writing to any of the properties the target element will start owning its own style data and stop using the shared copy. Writing to a property will mask the value coming from USS with the provided value however other properties will still match the values from USS.

Variables

alignContentAlignment of the whole area of children on the cross axis if they span over multiple lines in this container.
alignItemsAlignment of children on the cross axis of this container.
alignSelfSimilar to align-items, but only for this specific element.
backgroundColorBackground color to paint in the element's box.
backgroundImageBackground image to paint in the element's box.
backgroundSizeBackground image scaling in the element's box.
borderBottomSpace reserved for the bottom edge of the border during the layout phase.
borderBottomLeftRadiusThis is the radius of the bottom-left corner when a rounded rectangle is drawn in the element's box.
borderBottomRightRadiusThis is the radius of the bottom-right corner when a rounded rectangle is drawn in the element's box.
borderBottomWidthSpace reserved for the bottom edge of the border during the layout phase.
borderColorColor of the border to paint inside the element's box.
borderLeftSpace reserved for the left edge of the border during the layout phase.
borderLeftWidthSpace reserved for the left edge of the border during the layout phase.
borderRadiusThis is the radius of every corner when a rounded rectangle is drawn in the element's box.
borderRightSpace reserved for the right edge of the border during the layout phase.
borderRightWidthSpace reserved for the right edge of the border during the layout phase.
borderTopSpace reserved for the top edge of the border during the layout phase.
borderTopLeftRadiusThis is the radius of the top-left corner when a rounded rectangle is drawn in the element's box.
borderTopRightRadiusThis is the radius of the top-right corner when a rounded rectangle is drawn in the element's box.
borderTopWidthSpace reserved for the top edge of the border during the layout phase.
flexRation of this element in its parent during the layout phase.
flexDirectionDirection of the main axis to layout children in a container.
flexWrapPlacement of children over multiple lines if not enough space is available in this container.
fontFont to draw the element's text.
fontSizeFont size to draw the element's text.
fontStyleFont style to draw the element's text.
heightFixed height of an element for the layout.
justifyContentJustification of children on the main axis of this container.
marginBottomSpace reserved for the bottom edge of the margin during the layout phase.
marginLeftSpace reserved for the left edge of the margin during the layout phase.
marginRightSpace reserved for the right edge of the margin during the layout phase.
marginTopSpace reserved for the top edge of the margin during the layout phase.
maxHeightMaximum height for an element, when it is flexible or measures its own size.
maxWidthMaximum width for an element, when it is flexible or measures its own size.
minHeightMinimum height for an element, when it is flexible or measures its own size.
minWidthMinimum height for an element, when it is flexible or measures its own size.
paddingBottomSpace reserved for the bottom edge of the padding during the layout phase.
paddingLeftSpace reserved for the left edge of the padding during the layout phase.
paddingRightSpace reserved for the right edge of the padding during the layout phase.
paddingTopSpace reserved for the top edge of the padding during the layout phase.
positionBottomBottom distance from the element's box during layout.
positionLeftLeft distance from the element's box during layout.
positionRightRight distance from the element's box during layout.
positionTopTop distance from the element's box during layout.
positionTypeElement's positioning in its parent container.
sliceBottomSize of the 9-slice's bottom edge when painting an element's background image.
sliceLeftSize of the 9-slice's left edge when painting an element's background image.
sliceRightSize of the 9-slice's right edge when painting an element's background image.
sliceTopSize of the 9-slice's top edge when painting an element's background image.
textAlignmentText alignment in the element's box.
textClippingClipping if the text does not fit in the element's box.
textColorColor to use when drawing the text of an element.
widthFixed width of an element for the layout.
wordWrapWord wrapping over multiple lines if not enough space is available to draw the text of an element.