Crate style_traits

source ·
Expand description

This module contains shared types and messages for use by devtools/script. The traits are here instead of in script so that the devtools crate can be modified independently of the rest of Servo.


pub use crate::specified_value_info::CssType;
pub use crate::specified_value_info::KeywordsCollectFn;
pub use crate::specified_value_info::SpecifiedValueInfo;
pub use crate::values::Comma;
pub use crate::values::CommaWithSpace;
pub use crate::values::CssWriter;
pub use crate::values::OneOrMoreSeparated;
pub use crate::values::Separator;
pub use crate::values::Space;
pub use crate::values::ToCss;


A thin atomically-reference-counted slice.
Types used to access the DOM from style calculation.
A replacement for Box<[T]> that cbindgen can understand.
A replacement for Box<str> that has a defined layout for FFI.
Value information for devtools.
Helper types and traits for the handling of CSS values.
Helper types for the @viewport rule.


Geometry in the coordinate system of the render target (screen or intermediate surface) in physical pixels.
The mode to use when parsing values.
Represents a mobile style pinch zoom factor. TODO(gw): Once WR supports pinch zoom, use a type directly from webrender_api.


One CSS “px” in the coordinate system of the “initial viewport”:
Errors that can be encountered while parsing CSS values.
Specific errors that can be encountered while parsing property values.


Speculatively execute paint code in the worklet thread pool.

Type Definitions

The error type for all CSS parsing routines.
Error in property value parsing