theme

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package theme provides the framework's default page theme — the visual identity for any app built via core-ui (or its consumers like kiln). Hosts get token-driven palette/spacing/typography out of the box, plus utility classes (kiln-section, kiln-card, kiln-button, kiln-grid-*, …) that reference canonical theme tokens.

A host can override individual tokens by passing a custom Theme to PageTheme — every utility class re-resolves to the new value, so a single token swap re-skins the whole app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PageCSS

func PageCSS(t style.Theme) string

PageCSS builds the kiln-page stylesheet by resolving canonical theme tokens through core-ui/style. Output:

  1. :root CSS custom properties (every canonical token)
  2. body.kiln-app reset + base typography
  3. Layout primitives: kiln-container[-{sm,md,lg}], kiln-section[-{soft,inverse}]
  4. Stacks/rows/grids: kiln-stack[-{sm,lg}], kiln-row[-{end,between,wrap}], kiln-grid-{2,3,4,auto}
  5. Components: kiln-card[-soft], kiln-button[-{secondary,ghost}], kiln-nav, kiln-footer, kiln-pill, kiln-quote, kiln-hero, kiln-eyebrow
  6. Default styles for native form controls + tables on body.kiln-app

Class names use the kiln- prefix for backwards compatibility with pages already authored against them. The framework owns these names going forward.

func PageTheme

func PageTheme() style.Theme

PageTheme returns the page theme. Overrides directly mutate the returned theme value before it's emitted; callers compose by assigning to the typed fields:

t := theme.PageTheme()
t.Colors.Primary = style.Color{Name: "primary", Value: "#0F172A"}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL