The RootEm
field of the LengthUnit
enumeration represents the font size of the root element. It is used in the context of CSS-like styling within the Sandbox UI framework to specify lengths relative to the root element's font size.
The RootEm
field of the LengthUnit
enumeration represents the font size of the root element. It is used in the context of CSS-like styling within the Sandbox UI framework to specify lengths relative to the root element's font size.
Use LengthUnit.RootEm
when you need to define a length that is relative to the font size of the root element. This is particularly useful for responsive design, where you want elements to scale based on the root font size.
// Example of using LengthUnit.RootEm in a UI component var length = new Length(2, LengthUnit.RootEm); // This sets the length to be twice the root element's font size.