Skip to main content

Length

Typeobject
Backlinks6
PropertyTypeRequired
classstringRequired
valuenumberRequired
typesintegerRequired

class​

Required

Type

string

Value

constant: the value of this property must be equal to:

"length"

value​

Required

Description

This property is used to describe the type of behavior for distance or size values in various properties. Length properties can be applied with different units to set the width, height, etc. of elements. The units and meaning of values depend on their types.

Type

number

types​

Required

Description

no description

Type

integer

Value

enum: the value of this property must be equal to one of the following values:

ValueExplanation
1
fixed (px): Width or height is a fixed value.
2
relative (percent): The width or height of the child is the percentage relative to the width or height of the parent. Only children whose parents apply layout are available.
3
auto: The width or height of the element will be calculated automatically. This value should not be applied to the maximum/minimum width and height. In this case, the value of value is meaningless.
4
fit content: The size of the parent is calculated from the sum of the size of the child nodes. In this case, the value of value is meaningless. Only the parent is available.