Utility classes for changing an element's display property. Display affects the element's appearance and the UXML document's structure.

Changing display style will affect your UXML document's structure. Elements with display style of flex will take up room, and affect other element's position, while elements with display style of none will not. If your desired behaviour is to always maintain it's space in the UXML document, but only toggle visibility, check out Visibility Utility Classes.

Classes for display are named using the format: [display]-[value].

Where value includes:

  • flex - for display: flex
  • none - for display: none
ClassContents

Note that display: flex is the default value for display style in Unity. Unless the value needs to be overridden from a parent, the display-flexclass is not needed.

0
1
2

UXML

0
2

UXML