Module values

Source
Expand description

Common values used in CSS.

Re-exports§

pub use crate::servo::url::CssUrl;

Modules§

animated
Animated values.
computed
Computed values.
distance
Machinery to compute distances between animatable values.
generics
Generic types that share their serialization implementations for both specified and computed values.
resolved
Resolved values. These are almost always computed values, but in some cases there are used values.
specified
Specified values.

Structs§

AtomString
A CSS string stored as an Atom.
CowRcStr
A string that is either shared (heap-allocated and reference-counted) or borrowed.
CustomIdent
https://drafts.csswg.org/css-values-4/#custom-idents
DashedIdent
https://www.w3.org/TR/css-values-4/#dashed-idents This is simply an Atom, but will only parse if the identifier starts with “–”.
GenericAtomIdent
A generic CSS <ident> stored as an Atom.
KeyframesName
The .
Parser
A CSS parser that borrows its &str input, yields Tokens, and keeps track of nested blocks and functions.
SourceLocation
The line and column number for a given position within the input.

Enums§

Either
A struct representing one of two kinds of values.
Impossible
Convenience void type to disable some properties and values through types.
Token
One of the pieces the CSS input is broken into.

Functions§

normalize
Normalizes a float value to zero after a set of operations that might turn it into NaN.
serialize_atom_identifier
Serialize an identifier which is represented as an atom.
serialize_atom_name
Serialize a name which is represented as an Atom.
serialize_identifier
Write a CSS identifier, escaping characters as necessary.
serialize_name
Write a CSS name, like a custom property name.
serialize_normalized_percentage
Serialize a value into normalized (no NaN/inf serialization) percentage.
serialize_number
Serialize a number with calc, and NaN/infinity handling (if enabled)
serialize_percentage
Serialize a value into percentage.
serialize_specified_dimension
Serialize a specified dimension with unit, calc, and NaN/infinity handling (if enabled)

Type Aliases§

AtomIdent
A generic CSS <ident> stored as an Atom, for the default atom set.
CSSFloat
A CSS float value.
CSSInteger
A CSS integer value.