Skip to main content

Module computed

Module computed 

Source
Expand description

An element’s computed style: the components its resolved attributes become, built one way for spawning and for a restyle.

ComputedStyle::new turns the cascade’s result for one element into every style component it carries: the layout Style, the paint, the text style, the state patches, the widget palettes. Spawning inserts them; a restyle commits them over the live components, which removes what the cascade no longer sets, keeps what a runtime system holds in StyleOverrides, and starts a transition where one is declared.

Structs§

ComputedStyle
Every style component one element carries, computed from its resolved attributes. None is a component it does not carry.
StyleContext
What an element is, beyond its styles, that decides how its styles become components. Spawning reads it off the element’s attributes; a restyle reads it off the components spawning attached.