pub type CSSNumber = f32;
Expand description

A CSS <number> value.

Numbers may be explicit or computed by calc(), but are always stored and serialized as their computed value.

Trait Implementations

Converts to this type from the input type.

Converts this type into the (usually inferred) input type.

Returns the result of the operation.

Returns the result of the operation in the same type.

Returns the result of the operation in a different type.

Parse a value of this type using an existing parser.

Parse a value from a string. Read more

Returns the sign of the value.

Returns whether the value is positive.

Returns whether the value is negative.

Serialize self in CSS syntax, writing to dest.

Serialize self in CSS syntax and return a string. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Returns the zero value.

Returns whether the value is zero.