# Sandbox.UI.LengthUnit

Possible units for various CSS properties that require length, used by [Sandbox.UI.Length](/api/Sandbox.UI.Length) struct.

- Kind: enum
- Namespace: `Sandbox.UI`
- Assembly: `Sandbox.System`
- Modifiers: sealed

## Fields

- [`Auto`](/api/Sandbox.UI.LengthUnit/Auto): The layout engine will calculate and select a width for the specified element.
- [`Center`](/api/Sandbox.UI.LengthUnit/Center): In the middle of the parent at the appropriate axis.
- [`Contain`](/api/Sandbox.UI.LengthUnit/Contain): For background images, contain the image within the element bounds.
- [`Cover`](/api/Sandbox.UI.LengthUnit/Cover): For background images, cover the entire element with the image, stretcing and cropping as necessary.
- [`Em`](/api/Sandbox.UI.LengthUnit/Em): Font size of the current element.
- [`End`](/api/Sandbox.UI.LengthUnit/End): End of the parent at the appropriate axis.
- [`Expression`](/api/Sandbox.UI.LengthUnit/Expression): Represents a calc( ... ) expression
- [`Percentage`](/api/Sandbox.UI.LengthUnit/Percentage): The length is a percentage (0-100) of the parent's length. (typically)
- [`Pixels`](/api/Sandbox.UI.LengthUnit/Pixels): The length is in pixels.
- [`RootEm`](/api/Sandbox.UI.LengthUnit/RootEm): Font size of the root element.
- [`Start`](/api/Sandbox.UI.LengthUnit/Start): Start of the parent at the appropriate axis.
- [`Undefined`](/api/Sandbox.UI.LengthUnit/Undefined): Similar to CSS 'unset', basically means we don't have a value; should only really be used under certain circumstances (e.g. to handle background sizing properly).
- [`ViewHeight`](/api/Sandbox.UI.LengthUnit/ViewHeight): The length is a percentage (0-100) of the viewport's height.
- [`ViewMax`](/api/Sandbox.UI.LengthUnit/ViewMax): The length is a percentage (0-100) of the viewport's largest side/edge.
- [`ViewMin`](/api/Sandbox.UI.LengthUnit/ViewMin): The length is a percentage (0-100) of the viewport's smallest side/edge.
- [`ViewWidth`](/api/Sandbox.UI.LengthUnit/ViewWidth): The length is a percentage (0-100) of the viewport's width.

## Methods

- [`IsDynamic`](/api/Sandbox.UI.LengthUnitExtension/IsDynamic): Determine whether this unit type is dynamic (ie. should be updated regularly) or whether it's constant
