module
UI::DesignTokens::Defaults
Overview
Default palette and scale values. Kept in a private namespace so the
Tokens.default factory is the one publicly-documented entry point.
Numeric values match Components::CSS::Tokens::Theme.amber_default and
Components::CSS::Config exactly — amber_theme.cr is the source of
truth for OKLCH values; css_config.cr is the source of truth for
spacing/radius/typography/breakpoints.
Extended Modules
Defined in:
ui/design_tokens.crInstance Method Summary
- #breakpoints : Breakpoints
- #dark_palette : ColorPalette
- #light_palette : ColorPalette
-
#material : Material
Phase 5 — glass material defaults.
- #motion_scale : MotionScale
-
#radius_scale : RadiusScale
Library-generic radius scale.
- #shadow_scale : ShadowScale
-
#spacing : SpacingScale
Tailwind/css_config-derived spacing scale in rem.
-
#type_scale : TypeScale
The body/title/headline sizes are stored in rem (1rem == 16 logical points).
Instance Method Detail
Phase 5 — glass material defaults.
Per-step values calibrated to preserve every renderer's existing
visual behavior at intensity == 1.0. Brands override these via
Brand#override_material(material) returning a new Material (use
the auto-generated record copy_with to mutate just the fields the
brand cares about).
Library-generic radius scale. Names: none / sm / md / lg / xl / x2l / pill.
Numeric values track css_config.cr default_border_radius.
The body/title/headline sizes are stored in rem (1rem == 16 logical
points). The Apple generator multiplies by 16 and overrides with
HIG-canonical sizes (17 pt body) only when the brand has not customized
the size — see AppleGenerator for the policy.