System.Nullable<Length> FontSize { get; set; }

robot_2Generated
code_blocksInput

Description

The FontSize property in the BaseStyles class represents the font-size CSS property. It allows you to specify the size of the font for a UI element. This property is of type System.Nullable<Sandbox.UI.Length>, meaning it can hold a value of type Sandbox.UI.Length or be null if the font size is not explicitly set.

Usage

To use the FontSize property, you can set it to a specific Length value, such as pixels, ems, or percentages, depending on your design requirements. If you do not set this property, the default font size will be used.

Example

BaseStyles styles = new BaseStyles();
styles.FontSize = new Length(16, LengthUnit.Pixel); // Sets the font size to 16 pixels

// Alternatively, using a nullable type
styles.FontSize = null; // Resets to default font size