Skip to main content

Crate superui_css

Crate superui_css 

Source
Expand description

superui_css — the bevy_superui CSS layer: an in-tree fork of bevy_flair 0.9 (Bevy 0.20) re-exported behind an HTML-shaped surface.

The fork already matches real HTML element/attribute/class/id and :hover/:focus/:checked selectors; this crate bundles it into one plugin and adds an HTML tag-name interner (see html_type_name). Only Bevy-facing crates depend on this one (design §4).

Re-exports§

pub use superui_flair_core as core;
pub use superui_flair_css_parser as parser;
pub use superui_flair_style as style;

Modules§

prelude
The HTML-shaped surface Plan 5’s reconciler and authored code reach for.

Structs§

StyleData
Gathers all data needed to calculate styles. Selectors will use this struct to decide if the entity is a match or not.
SuperUiCssPlugin
The one plugin Plan 5’s SuperUiPlugin adds to get the full CSS engine: property registry, the style/selector systems, default animations, and the .css asset loader. Mirrors upstream bevy_flair::FlairPlugin.

Enums§

SliderPart
Tags an entity as a part of a bevy_ui_widgets slider so ::slider-track, ::slider-fill, and ::slider-thumb selectors match it.

Functions§

html_type_name
The flair TypeName component for an HTML tag (lowercased, interned). Insert this on a UI entity to give it its element-selector identity (div, li, …).
intern_tag
Intern an HTML tag name to a process-lifetime &'static str, ASCII-lowercased (HTML tag names are case-insensitive). Each distinct tag is leaked exactly once; the tag vocabulary is finite, so this is a bounded one-time cost. Repeated calls for the same tag (in any casing) return the same pointer.