howdy/ui/theme/tokens
The values components use in place of colours, fonts and radii. Each is
a var() reference to a property every theme defines, so a class built
from tokens looks right under any theme without being re-rendered.
import howdy/ui/theme/tokens
import sketch/css
fn badge() -> css.Class {
css.class([
css.background(tokens.primary),
css.color(tokens.on_primary),
css.property("border-radius", tokens.radius_small),
])
}
Spacing is not themed. It is a fixed scale in rem so layouts stay stable when the theme changes.
Values
pub fn all() -> List(#(String, String))
Every token, paired with the property it reads. Used by tests to check
each token is defined by theme.variables.
pub const background: String
pub const font_heading: String
pub const on_primary: String
pub const primary_hover: String
pub const radius_large: String
pub const radius_medium: String
pub const radius_small: String
pub const text_muted: String