style::values::computed::length_percentage

Type Alias CalcNode

source
pub type CalcNode = GenericCalcNode<CalcLengthPercentageLeaf>;
Expand description

The computed version of a calc() node for <length-percentage> values.

Aliased Type§

enum CalcNode {
Show 14 variants Leaf(CalcLengthPercentageLeaf), Negate(Box<GenericCalcNode<CalcLengthPercentageLeaf>>), Invert(Box<GenericCalcNode<CalcLengthPercentageLeaf>>), Sum(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>), Product(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>), MinMax(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>, MinMaxOp), Clamp { min: Box<GenericCalcNode<CalcLengthPercentageLeaf>>, center: Box<GenericCalcNode<CalcLengthPercentageLeaf>>, max: Box<GenericCalcNode<CalcLengthPercentageLeaf>>, }, Round { strategy: RoundingStrategy, value: Box<GenericCalcNode<CalcLengthPercentageLeaf>>, step: Box<GenericCalcNode<CalcLengthPercentageLeaf>>, }, ModRem { dividend: Box<GenericCalcNode<CalcLengthPercentageLeaf>>, divisor: Box<GenericCalcNode<CalcLengthPercentageLeaf>>, op: ModRemOp, }, Hypot(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>), Abs(Box<GenericCalcNode<CalcLengthPercentageLeaf>>), Sign(Box<GenericCalcNode<CalcLengthPercentageLeaf>>), Anchor(Box<GenericAnchorFunction<Box<GenericCalcNode<CalcLengthPercentageLeaf>>, Box<GenericCalcNode<CalcLengthPercentageLeaf>>>>), AnchorSize(Box<GenericAnchorSizeFunction<Box<GenericCalcNode<CalcLengthPercentageLeaf>>>>),
}

Variants§

§

Leaf(CalcLengthPercentageLeaf)

A leaf node.

§

Negate(Box<GenericCalcNode<CalcLengthPercentageLeaf>>)

A node that negates its child, e.g. Negate(1) == -1.

§

Invert(Box<GenericCalcNode<CalcLengthPercentageLeaf>>)

A node that inverts its child, e.g. Invert(10) == 1 / 10 == 0.1. The child must always resolve to a number unit.

§

Sum(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>)

A sum node, representing a + b + c where a, b, and c are the arguments.

§

Product(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>)

A product node, representing a * b * c where a, b, and c are the arguments.

§

MinMax(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>, MinMaxOp)

A min or max function.

§

Clamp

A clamp() function.

Fields

§center: Box<GenericCalcNode<CalcLengthPercentageLeaf>>

The central value.

§

Round

A round() function.

Fields

§strategy: RoundingStrategy

The rounding strategy.

§value: Box<GenericCalcNode<CalcLengthPercentageLeaf>>

The value to round.

§

ModRem

A mod() or rem() function.

Fields

§dividend: Box<GenericCalcNode<CalcLengthPercentageLeaf>>

The dividend calculation.

§divisor: Box<GenericCalcNode<CalcLengthPercentageLeaf>>

The divisor calculation.

§op: ModRemOp

Is the function mod or rem?

§

Hypot(OwnedSlice<GenericCalcNode<CalcLengthPercentageLeaf>>)

A hypot() function

§

Abs(Box<GenericCalcNode<CalcLengthPercentageLeaf>>)

An abs() function.

§

Sign(Box<GenericCalcNode<CalcLengthPercentageLeaf>>)

A sign() function.

§

Anchor(Box<GenericAnchorFunction<Box<GenericCalcNode<CalcLengthPercentageLeaf>>, Box<GenericCalcNode<CalcLengthPercentageLeaf>>>>)

An anchor() function.

§

AnchorSize(Box<GenericAnchorSizeFunction<Box<GenericCalcNode<CalcLengthPercentageLeaf>>>>)

An anchor-size() function.