Preview 2.0 is now in Public Beta!
Read the Announcement
Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages.

Summary

Functions

convertToString

convertToString(length: PercentLengthType): string
Parameter Default Description
length

Returns string

equals

equals(a: PercentLengthType, b: PercentLengthType): boolean
Parameter Default Description
a

b

Returns boolean

parse

parse(text: string): PercentLengthType
Parameter Default Description
text
string

toDevicePixels

toDevicePixels(length: PercentLengthType, auto?: number, parentAvailableWidth?: number): number
Converts PercentLengthType unit to device pixels.
Parameter Default Description
length

The PercentLengthType to convert.

auto
number

Value to use for conversion of "auto". By default is Math.NaN.

parentAvailableWidth
number

Value to use as base when converting percent unit. By default is Math.NaN.

Returns number
Previous
Length