Types

Link copied to clipboard
Link copied to clipboard
data class Calc(val expression: String) : LinearDimension

A calc() expression with percentages, which are taken of the same length as a percentage of the property; computed styles have the other relative units in pixels

Link copied to clipboard
class Calculate(val function: (CalculateContext) -> Double) : LinearDimension
Link copied to clipboard
object Companion
Link copied to clipboard
class Fraction(val value: Double) : LinearDimension
Link copied to clipboard
Link copied to clipboard
class Percent(val value: Double) : LinearDimension
Link copied to clipboard
class PX(val value: Double) : LinearDimension
Link copied to clipboard
data class Relative(val value: Double, val unit: String) : LinearDimension

A length relative to the font size, unit em, to the font size of the root, rem, or to the width or height of the window, vw and vh; computed styles have it in pixels

Functions

Link copied to clipboard
fun inPixels(parentLengthInPx: Double): Double