Type Alias style::values::computed::Number

source ·
pub type Number = CSSFloat;
Expand description

A <number> value.

Trait Implementations§

source§

impl Animate for f32

source§

fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>

Animate a value towards another one, given an animation procedure.
source§

impl ColorComponentType for f32

The raw f32 here is for .

source§

fn from_value(value: f32) -> Self

Construct a new component from a single value.
source§

fn units() -> CalcUnits

Return the CalcUnits flags that the impl can handle.
source§

fn try_from_token(token: &Token<'_>) -> Result<Self, ()>

Try to create a new component from the given token.
source§

fn try_from_leaf(leaf: &SpecifiedLeaf) -> Result<Self, ()>

Try to create a new component from the given [CalcNodeLeaf] that was resolved from a [CalcNode].
source§

impl ComputeSquaredDistance for f32

source§

fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>

Computes the squared distance between two animatable values.
source§

impl From<MozScriptSizeMultiplier> for f32

source§

fn from(v: MozScriptSizeMultiplier) -> f32

Converts to this type from the input type.
source§

impl From<Number> for f32

source§

fn from(n: Number) -> Self

Converts to this type from the input type.
source§

impl ToAnimatedValue for f32

§

type AnimatedValue = f32

The type of the animated value.
source§

fn to_animated_value(self) -> Self

Converts this value to an animated value.
source§

fn from_animated_value(animated: Self::AnimatedValue) -> Self

Converts back an animated value into a computed value.
source§

impl ToAnimatedZero for f32

source§

fn to_animated_zero(&self) -> Result<Self, ()>

Returns a value that, when added with an underlying value, will produce the underlying value. This is used for SMIL animation’s “by-animation” where SMIL first interpolates from the zero value to the ‘by’ value, and then adds the result to the underlying value. Read more
source§

impl ToComputedValue for f32

§

type ComputedValue = f32

The computed value type we’re going to be converted to.
source§

fn to_computed_value(&self, _: &Context<'_>) -> Self

Convert a specified value to a computed value, using itself and the data inside the Context.
source§

fn from_computed_value(other: &Self) -> Self

Convert a computed value to specified value form. Read more
source§

impl ToResolvedValue for f32

§

type ResolvedValue = f32

The resolved value type we’re going to be converted to.
source§

fn to_resolved_value(self, _: &Context<'_>) -> Self

Convert a resolved value to a resolved value.
source§

fn from_resolved_value(resolved: Self::ResolvedValue) -> Self

Convert a resolved value to resolved value form.