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§
- Atom
String - A CSS string stored as an
Atom
. - CowRc
Str - A string that is either shared (heap-allocated and reference-counted) or borrowed.
- Custom
Ident - https://drafts.csswg.org/css-values-4/#custom-idents
- Dashed
Ident - https://www.w3.org/TR/css-values-4/#dashed-idents This is simply an Atom, but will only parse if the identifier starts with “–”.
- Generic
Atom Ident - A generic CSS
<ident>
stored as anAtom
. - Keyframes
Name - The
. - Parser
- A CSS parser that borrows its
&str
input, yieldsToken
s, and keeps track of nested blocks and functions. - Source
Location - 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§
- Atom
Ident - A generic CSS
<ident>
stored as anAtom
, for the default atom set. - CSSFloat
- A CSS float value.
- CSSInteger
- A CSS integer value.