Interface StypAddSub<TUnit>

CSS calc() function call representation containing either addition or subtraction.

Type Parameters

  • TUnit extends string

    Allowed unit type.

Hierarchy

Properties

dim: Kind<TUnit>
left: StypNumeric<TUnit, StypZero<TUnit>>

Left operand.

op: "+" | "-"

Operator.

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.

right: StypNumeric<TUnit, StypZero<TUnit>>

Right operand.

type: "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