Skip to main content

Module style

Module style 

Source
Expand description

The Style object, its dirty-group partition (style_groups, StyleDirty), and the with_style_fields! table every style field is registered in.

Modules§

style_groups
Bit flags naming the groups of work [crate::ui_map::apply_style] (and the update reconciler) derive from a Style. Each Style field belongs to the group(s) whose output reads it (see [with_style_fields]); a delta update ORs the groups of its touched fields into a StyleDirty mask so the apply path can skip every group the delta provably didn’t affect.

Structs§

Style
A CSS-like style object mapped onto bevy_ui::Node and its sibling visual components. Every field is optional; unset fields keep Bevy’s defaults.
StyleDirty
Which style_groups a delta update touched. ALL (every bit set) is the full-reapply mask used by non-delta paths.

Enums§

LayerCache
The Style::cache keyword: "auto" (default) leaves promotion to the other rules; "always" force-promotes the subtree to a cached composited layer; "never" force-promotes it too but re-captures it every frame — the escape hatch for content whose pixels are written outside the dirt tracking’s sight (a live <portal> render target, an app-owned texture). Opting out of opacity promotion is groupAlpha: false.