Skip to main content

Module skins

Module skins 

Source
Expand description

Embedded user-agent skin stylesheets. Embedded user-agent stylesheets.

[DEFAULT] / [MACOS] / [WINDOWS] / [LINUX] are opt-in, activated via <root skin="<name>"> or lumen.toml [skin] name = "..."; when neither opts in, none of them is applied.

[UA] is different: it is not selected by name and applies to every app unconditionally, beneath whichever named skin (if any) and beneath the app’s own CSS - see its own doc comment.

Constants§

DEFAULT
Default (neutral, dark-first) skin CSS for buttons, inputs, toggles, sliders, and tiles.
LINUX
Linux (libadwaita-leaning neutral) skin: flat fg-alpha fills, bold accent, 12px popovers, 46x26 pill switches.
MACOS
macOS-flavoured skin (macOS 14/15-era Aqua): 20px buttons, no hover feedback, pill switch, soft accent focus halo.
NAMES
The list of recognised skin names (excluding auto).
UA
The always-on user-agent baseline: per-tag sizing floors (button / input / toggle / switch / slider / progress minimums, root / title-bar fill) applied beneath any opt-in skin and beneath app CSS. Folded into the combined cascade by run::loading::load_ir for every app, skinned or not - the framework’s equivalent of a browser’s built-in stylesheet.
WINDOWS
Windows 11 / WinUI 3 (Fluent 2) skin: 4px radii, accent primary buttons, elevation bottom edge, keyboard-only focus ring.

Functions§

lookup
Returns the embedded CSS source for name, or None for an unknown skin. "auto" resolves to the current OS per resolve_auto, so forcing any concrete name on any OS works (cross-platform preview).
resolve_auto
Maps std::env::consts::OS onto a concrete skin name: "macos" / "windows" / everything else -> "linux" (the adwaita-leaning neutral degrades gracefully across desktops).