gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4d58708c4d58708cthree-pane: format Style with nested rules and bare mediamre4d58708c/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`; corner radii `--radius-small` (5px) `--radius-large` (10px).
  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

  • 4d58708cthree-pane: format Style with nested rules and bare mediamre
  • 0bbfc553main-menu: format Style with nested rules and bare mediamre
  • 7755199dlist-first: format Style with nested rules and bare mediamre
  • 35199303content-first: format Style with nested rules and bare mediamre
  • 00f6e698app-sidebar: format Style with nested rules and bare mediamre
  • bb2f29c9app-header: format Style with nested rules and bare mediamre
  • 3aca2d7fSync components from 8176eb1 with reviewed nested stylesmre
  • 87e4003dRe-vendor layouts to Hybriel set day35mre
  • d8628cfflayouts: a startup error prints its message before exit 1 (hybriel#247)mre
  • 180fd76elayouts: MdEditor from components 59704ce (text on the clipboard always pastes, a file manager copy still attaches; pipe rows; empty Table-button table; tickets#49, notes#5)mre
  • a3eda8afRe-vendor Hybriel master 7a684920 (binary 74ab3715): plugins whole, startup fault exits 1; files-upload gate 340/0mre
  • 025d5880WIP re-vendor Hybriel set-day27b (a9712e61, master f5ff97bf): plugins whole, startup fault exits 1; NOT deployable: files-upload emit refused (see .scratch/rv27-upload)mre
  • 42183a71Merge sb3-standby: layouts deploys through its standbymre
  • 408de1f2layouts: no jobs switch needed in the standbymre
  • 0b85f57elayouts: a standby container (port 45019, profile standby); deploy hands over through standby-swap.sh without a gapmre
  • 31e40b8bMerge dm3-media: range handling in the layouts media routemre
  • 856dcacbLayouts media route: read suffix ranges and ignore range lists and garbage, like the components route (the layouts copy still answered 416 for the last bytes)mre
  • ad5056eaMerge dm3-sync: components re-sync to c2834ddmre
  • 740e2abeRe-sync the components copy to c2834dd: media player fixes (state after a queue pick, cover-less audio, accessibility labels)mre
  • 7fe103bbMerge mp-player: the media player showcase pagemre