Class StypNumericStruct<TSelf, TUnit>Abstract

Base implementation of structured numeric CSS property value.

Type Parameters

  • TSelf extends StypNumericStruct<TSelf, TUnit>

    A type of itself.

  • TUnit extends string

    Allowed unit type.

Hierarchy

Constructors

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: 0 | "dimension" | "calc"

A type of structured numeric CSS property 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