Crate style

source ·
Expand description

Calculate specified and computed values from a tree of DOM nodes and a set of stylesheets.

In particular, this crate contains the definitions of supported properties, the code to parse them into specified values and calculate the computed values based on the specified values, as well as the code to serialize both specified and computed values.

The main entry point is recalc_style_at.

Major dependencies are the cssparser and selectors crates.

Re-exports§

Modules§

Macros§

Structs§

  • An allocation error.
  • A wrapper type for a refcounted slice using ThinArc.
  • A struct that basically replaces a Box<[T]>, but which cbindgen can understand.
  • A struct that basically replaces a Box, but with a defined layout, suitable for FFI.

Traits§

  • Extension methods for selectors::attr::CaseSensitivity
  • A trait pretty much similar to num_traits::One, but without the need of implementing Mul.
  • Shrink the capacity of the collection if needed.
  • A trait pretty much similar to num_traits::Zero, but without the need of implementing Add.
  • A trait implementing a function to tell if the number is zero without a percent

Functions§

  • We shrink the capacity of a collection if we’re wasting more than a 25% of its capacity, and if the collection is arbitrarily big enough (>= CAPACITY_THRESHOLD entries).

Type Aliases§