gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit877b63ac877b63acdesign rules: two radii only (5px small, 10px large)mre877b63ac/docs/layouts/theme.md

2.2 KB

  1. # Theme — tokens and plain elements (`theme/theme.hl`)
  2. **Purpose**: the WorldAPI look as ONE styles file an app inherits: palette + semantic roles (from `shared/tokens.hl`),
  3. layout tokens, type-colour slots, plain HTML elements, and the WorldAPI rules for the components of
  4. components.hybriel.worldapi.org.
  5. **Parent / children**: the app's `styles.hl` does `inherit './theme/theme.hl'`; nothing else imports it.
  6. **Tokens** (css variables): palette `--dark --darker --light --lighter --blue-dark --green-dark --yellow --orange --red
  7. --purple --blue-light --green-light`; roles `--color-background --color-background-sunken --color-surface --color-border
  8. --color-text --color-text-strong --color-text-muted --color-action --color-success --color-warning --color-danger
  9. --color-special --color-accent --color-accent-text`; type slots `--color-type1` … `--color-type6`; layout `--layout-column
  10. --layout-gutter --layout-header --layout-sidebar --layout-list --layout-radius`.
  11. **Classes and states**: `button.primary`, `button.danger`, `a.button`, `button:disabled`; `.muted`; `p.empty`; `.pill`
  12. (+ `.type-1…6`, `.success`, `.warning`, `.danger`, `.quiet`); `.type-1…6`; `.visually-hidden`; `drop-zone` / `.drop-zone`
  13. (+ `.over`); `input[aria-invalid="true"]` (danger ring); `details[open]`.
  14. **Narrow / wide**: elements are fluid; the one breakpoint is `@media (min-width: 60rem)` (used by the shells).
  15. **Semantics**: native elements only; focus is always visible (`:focus-visible` accent ring); invalid fields use
  16. `aria-invalid`, never a colour alone.
  17. **Borders**: only `details` (the foldable), drop zones, focus and invalid rings. Everything else separates by surface
  18. (`--color-surface`, `--color-background-sunken`) and space.
  19. **Components**: section 3 repeats each component's own selector with `html ` in front (`'html pagination button'`) —
  20. one more element in the selector wins over the component's Style although that comes later in the one stylesheet, and
  21. hl:web never sees one selector twice. When a component changes its selectors, re-check here (the gate's computed-style
  22. checks catch it).
  23. **Example**: see [../using-the-theme.md](../using-the-theme.md) and https://layouts.worldapi.org/elements.
  24. **Do not use for**: app-specific looks — put them in the app's styles.hl with token names.

Branches

Latest commits

  • 877b63acdesign rules: two radii only (5px small, 10px large)mre
  • 635234dfcomponents re-synced to components.hybriel 5a98d77 (#15 black/white base look); gate 73/0, check-theme 0, screenshots unchangedmre
  • 876b2064docs: workaround note for hybriel#130 (slot marker mid-line)mre
  • 85b56541layouts mission 002 3/3: same-output tests, letcount, shots ports, docs, reportmre
  • 0f325d3blayouts mission 002 2/3: code rules — styles.hl -> components/styles.hl, the one never-reassigned let dropped; gate 73/0, same outputmre
  • a3e74c8alayouts mission 002 1/3: components re-copied byte-verbatim from components.hybriel 3f93d71 by tools/sync-components.sh (+ --check, components/SOURCE); gate 73/0, check-theme 0mre
  • 80ce6ba9report 001 (mission 075)mre
  • 5c6e338flayouts.worldapi.org in Hybriel: WorldAPI theme (tokens, borderless elements, themed components.hybriel components), shells (header, main/user menu, sidebar overlay, content-first, list-first, three-pane), showcase, check-theme helper; gate 73/0 (mission 075)mre