Skip to main content

Module calc

Module calc 

Source
Expand description

Re-exports§

pub use self::GenericCalcNode as CalcNode;

Macros§

compare_helpers 🔒

Structs§

CalcNodeWithLevel 🔒
CalcPercentageLeaf
The value of a percentage leaf node that contains an associated percent hint.
GenericAnchorFunctionFallback
Fallback type for anchor functions within calc(). Ideally, the fallback type is initial type of the property (e.g. GenericInset for left), but that causes circular reference. TODO(dshin, bug 2034100): Investigate ways to not require this. This handles the parsing of unitless zeros, as well as ensuring that e.g. calc(anchor(--foo left, 1px) + 10%) round trips (sorting aside), instead of becoming calc(anchor(--foo left, calc(1px)) + 10%).
GenericRandomFunction
A random() function. https://drafts.csswg.org/css-values-5/#funcdef-random

Enums§

ArgumentLevel 🔒
The level of any argument being serialized in to_css_impl.
CalcType
The non-mixed types that a math function can return. Note that is not represented in this list as a separate type from , as “math functions that resolve to can be used in any place that only accepts ”. CSS Typed OM also does not distinguish between numbers and integers.
GenericCalcNode
A generic node in a calc expression.
MinMaxOp
Whether we’re a min or max function.
ModRemOp
Whether we’re a mod or rem function.
ProgressClampingMode
The clamping mode used in progress()
RoundingStrategy
The strategy used in round()
SimplificationResult
The result of simplify_and_sort_direct_children
SortKey
This determines the order in which we serialize members of a calc() sum.

Traits§

CalcNodeLeaf
A trait that represents all the stuff a valid leaf of a calc expression.

Functions§

typed_arithmetic_enabled 🔒

Type Aliases§

GenericCalcAnchorFunction
anchor() function used in math functions.
GenericCalcAnchorSizeFunction
anchor-size() function used in math functions.