
unity-font-style: normal | italic | bold | bold-and-italic Text properties set the color, font, font size, and Unity specific properties for font resource, font style, alignment, word wrap, and clipping. If you have different radius values for two or more corners, Unity reduces any values greater than half of the element’s size to half of the element’s size. If you use percentage ( %) values for border radius properties, Unity first resolves the percentage to pixels and then reduces the border-radius value to half of the resolved pixel value. For example, for a 100px x 100px element, any border-radius value greater than 50px is reduced to 50px. Pixel lighting is calculated at every screen pixel. Pixel size depends on your screen resolution. Unity reduces border radius values to half of the element’s size in pixels The smallest unit in a computer image.Unity doesn’t support the second-radius shorthand ( border-radius: (first radius values) / (second radius values) ) used to create elliptical corners.For detailed information about border-radius, see the MDN documentation. */īorder radius properties work almost the same in USS and CSS. * The distance from the parent edge or the original position of the element. If sets to `absolute`, the element leaves its parent layout and values are specified based on the parent bounds.*/

Positioning /* The default value is `relative` which positions the element based on its parent. Justify-content: flex-start | flex-end | center | space-between | space-around * Items */Īlign-self: auto | flex-start | flex-end | center | stretchįlex-direction: row | row-reverse | column | column-reverseĪlign-content: flex-start | flex-end | center | stretchĪlign-items: flex-start | flex-end | center | stretch The layout engine implements a subset of Flexbox, an HTML/CSS layout system.īy default, all items are vertically placed in their container. UI Toolkit includes a layout engine that positions visual elements based on layout and styling properties. Unity’s model is equivalent to setting the CSS box-sizing property to border-box. An element’s rendered size is the sum of its padding, border-width, and width / height values. In the standard CSS box model, width and height define the size of the content box. The alternative box model that USS uses is different from the standard CSS box model. If height is not specified, the height is based on the height of the element’s contents. If width is not specified, the width is based on the width of the element’s contents. The width and height specifies the size of the element.


#FLEX 4 BUTTONBAR WIDTH PLUS#
a plus ( +) indicates that the preceding type, word, or group occurs one or more times.an asterisk ( *) indicates that the preceding type, word, or group occurs zero or more times.Square brackets ( ) denote grouping.Įvery type, keyword, or angle-bracketed group might be followed by modifiers:.A double ampersand ( &) separates two or more components, all of which must occur, in any order.A double bar ( ||) separates two or more options: one or more must occur, in any order.A bar ( |) separates two or more alternatives: exactly one must occur.Side-by-side words mean that all of them must occur in the given order.If a property value has more than one component: Non-terminals that share the same name as a property appear between angle brackets and single straight quotes ( ).Basic data types appear between angle brackets ( ).USS properties use the same grammar syntax as W3C CSS documents: For a complete list of USS properties, see USS properties reference.

This page introduces the common USS properties, their syntax and accepted values, and differences from CSS.
