Tuix Guide logo Tuix Guide


This page presents a comprehensive list of style properties supported by tuix.

Property Value Type Default Value Animatable Setter
display None | Flex Flex No .set_display()
visibility Visible | Invisible Visible No .set_visibility()
opacity Opacity(f32) Opacity(1.0) Yes .set_opacity()
position Relative | Absolute Relative No .set_position()
left Pixels | Percentage | Auto | Initial 0px Yes .set_left()
right Pixels | Percentage | Auto | Initial 0px Yes .set_right()
top Pixels | Percentage | Auto | Initial 0px Yes .set_top()
bottom Pixels | Percentage | Auto | Initial 0px Yes .set_bottom()
width Pixels | Percentage | Auto | Initial 0px Yes .set_width()
height Pixels | Percentage | Auto | Initial 0px Yes .set_height()
max-width Pixels | Percentage | Auto | Initial 0px Yes .set_max_width()
min-width Pixels | Percentage | Auto | Initial 0px Yes .set_min_width()
max-height Pixels | Percentage | Auto | Initial 0px Yes .set_max_height()
min-height Pixels | Percentage | Auto | Initial 0px Yes .set_min_height()
margin Pixels | Percentage | Auto | Initial 0px Yes .set_margin()
margin-left Pixels | Percentage | Auto | Initial 0px Yes .set_margin_left()
margin-right Pixels | Percentage | Auto | Initial 0px Yes .set_margin_right()
margin-top Pixels | Percentage | Auto | Initial 0px Yes .set_margin_top()
margin-bottom Pixels | Percentage | Auto | Initial 0px Yes .set_margin_bottom()
padding Pixels | Percentage | Auto | Initial 0px Yes .set_padding()
padding-left Pixels | Percentage | Auto | Initial 0px Yes .set_padding_left()
padding-right Pixels | Percentage | Auto | Initial 0px Yes .set_padding_right()
padding-top Pixels | Percentage | Auto | Initial 0px Yes .set_padding_top()
padding-bottom Pixels | Percentage | Auto | Initial 0px Yes .set_padding_bottom()
border-width Pixels | Percentage | Auto | Initial 0px Yes .set_border_width()
border-color Color rgba(0,0,0,0) Yes .set_border_color()
border-radius Pixels | Percentage | Auto | Initial 0px Yes .set_border_radius()
border-radius-top-left Pixels | Percentage | Auto | Initial 0px Yes .set_border_radius_top_left()
border-radius-top-right Pixels | Percentage | Auto | Initial 0px Yes .set_border_radius_top_right()
border-radius-bottom-left Pixels | Percentage | Auto | Initial 0px Yes .set_border_radius_bottom_left()
border-radius-bottom-right Pixels | Percentage | Auto | Initial 0px Yes .set_border_radius_bottom_right()
background-color Color rgba(0,0,0,0) Yes .set_background_color()
background-image None | String | LinearGradient | RadialGradient None No .set_background_image()
flex-direction Row | Column Column Yes .set_flex_direction()
justify-content FlexStart | FlexEnd | Center | Stretch | SpaceBetween | SpaceAround | SpaceEvenly FlexStart No .set_justify_content()
align-items FlexStart | FlexEnd | Center | Stretch Stretch No .set_align_items()
align-content FlexStart | FlexEnd | Center | Stretch | SpaceBetween | SpaceAround FlexStart No .set_align_content()
align-self FlexStart | FlexEnd | Center | Stretch Stretch No .set_align_self()
flex-grow f32 0.0 Yes .set_flex_grow()
flex-shrink f32 0.0 Yes .set_flex_shrink()
flex-basis Pixels | Percentage | Auto | Initial 0.0 Yes .set_flex_basis()
text-justify Start | Center | End Start No .set_text_justify()
text-align Start | Center | End Center No .set_text_align()
font String (fontID)   No .set_font()
color Color rgba(0,0,0,0) Yes .set_font_color()
font-size f32   Yes .set_font_size()

Display

The display, visibility, and opacity properties are used to determine whether an element is shown.

position

Positioning

The top, bottom, left and right properties are used with the postition property to place an entity.

position

top

bottom

left

Size

The width and height properties are used to set the desired width and height of an element.

width

height

Margins

Margins determine the space around an entity.

margin

margin-top

margin-bottom

margin-left

margin-right

Padding

Padding determines the space between an entity and its contained children.

padding

padding-top

padding-bottom

padding-left

padding-right