Foundations / Style

Layout

Markdown crates/theme/src/lib.rs docs.rs

Layout

Ask your agent

Install the bezel skill once

npx skills add crabtalk/bezel --skill bezel

Then ask

Make the settings cards use the theme spacing and corner radii, with the rows inside nested concentrically.
use theme::{ControlSize, Sizing as _, Theme};

let pad = 4.0;
div()
    .p(px(pad))
    .rounded(px(Theme::surface_radius()))
    .child(div().rounded(px(Theme::inset_radius(Theme::surface_radius(), pad))))

div().h(px(Theme::HEADER_HEIGHT)).gap(px(Theme::SPACE))
div().control_size(ControlSize::Small)
  • Radii are functions of Brand::radius, read process-wide. Call them where you paint; a radius stored in a const misses a brand change.
  • A rounded container does not pass its corner to its children; a child inset by pad takes inset_radius(outer, pad).
  • ui::stack::row and column already carry Theme::SPACE.