Skip to main content

Crate icss

Crate icss 

Source
Expand description

§ICSS — a CSS-like theme engine for iced

ICSS lets you style an iced application the way you’d style a web app: write a .icss file with classes, variables, and pseudo-states, then attach class lists to your widgets.

ⓘ
let theme = icss::Theme::load(include_str!("theme.icss"))?;
button("Connect").style(theme.button(&["button", "primary"]));

The crate is organised into three modules:

  • theme — parses .icss and resolves widget styles for iced.
  • engine — generates a complete .icss theme from a handful of base variables (OKLCH tonal palettes, dimensional tokens, semantic mapping).
  • widgets — theme-aware iced widgets that don’t ship with iced core (DataTable, TileGrid, ButtonGroup, StickySection, …).

Re-exports§

pub use engine::ThemeInputs;
pub use engine::ThemeOutput;
pub use engine::generate;
pub use theme::ParseError;
pub use theme::Stylesheet;
pub use theme::Theme;
pub use theme::parse_stylesheet;

Modules§

engine
Generative design system — produces .icss themes from base variables.
theme
CSS-like theme engine for iced.
widgets
Reusable iced widgets.