Expand description
CSS-like styling system for the browser-mode renderer.
Inspired by Remotion (React inline styles) and CSS box model. Provides:
CssStyle: a struct mirroring the CSS properties supported by the engineunits: parsing/resolution of CSS lengths (px, %, em, rem, vw, vh, fr, auto)cascade: parent → child inheritance passtaffy_bridge: conversionCssStyle→taffy::Stylefor layout
Layout is computed by taffy; paint is done by Skia in engine::paint_pass.
Re-exports§
pub use animation::apply_animated_props;pub use style::CssStyle;pub use units::Length;pub use units::LengthContext;pub use units::LengthPercentage;
Modules§
- animation
- Bridge from the legacy
AnimatedProperties(Flutter-style) to CSS-style overrides onCssStyle. Used by the new pipeline so animations resolved throughanimator::resolve_props_for_effectsflow intotransform,opacity,filter, etc. before layout/paint. - cascade
- CSS cascade & inheritance.
- style
CssStyle— typed mirror of the CSS properties supported by the engine.- taffy_
bridge CssStyle→taffy::Styleconverter.- units
- CSS length/percentage units.