Interface StypDimension<TUnit>

Structured dimension value with unit.

Type Parameters

  • TUnit extends string

    Allowed units type.

Hierarchy

Properties

dim: Kind<TUnit>
priority: number

CSS property value priority.

The value Important and above means the property is !important. Everything else means normal priority.

The property value with higher priority number takes precedence over the one with lower one.

type: "dimension"

A type of structured numeric CSS property value.

unit: TUnit

Dimension unit.

val: number

Dimension value.

Methods

  • Tries to converts this numeric value to another dimension.

    Does not actually construct a value in another dimension, as long as dimension unit supported by both dimensions.

    Type Parameters

    • TDimUnit extends string

      A unit type allowed in target dimension.

    Parameters

    • dim: Kind<TDimUnit>

      Target dimension.

    Returns undefined | StypNumeric<TDimUnit, StypZero<TDimUnit>>

    Either a value in dimension compatible with dim, or undefined if this value's unit is not supported by dim.

Generated using TypeDoc