Add landing page for kjol, documentation
This commit is contained in:
18
CLAUDE.md
18
CLAUDE.md
@@ -70,9 +70,21 @@ GOOS=js GOARCH=wasm go -C go test -exec="node testdata/domexec.js" ./wasmruntime
|
||||
```
|
||||
|
||||
`webui` components that measure the page (Tooltip, Popover, Menu, Modal, DatePicker, Tutorial,
|
||||
AutoTable) are **controllers**: create them once alongside your signals, never inside a render
|
||||
closure. Floating panels share one positioning engine (`webui/position.go`, pure math, unit-tested
|
||||
natively) driven by the `Floating` controller (`webui/floating.go`).
|
||||
AutoTable, SignaturePad, AsyncCombobox) are **controllers**: create them once alongside your
|
||||
signals, never inside a render closure. Floating panels share one positioning engine
|
||||
(`webui/position.go`, pure math, unit-tested natively) driven by the `Floating` controller
|
||||
(`webui/floating.go`).
|
||||
|
||||
**Theming / dark mode.** The kit is themed by **semantic tokens**, not by a `dark:` variant on
|
||||
every class: components say `bg-surface` / `border-line` / `text-ink` / `text-accent` and never
|
||||
name a colour, so a theme is ten CSS variables rather than four hundred class strings. The app
|
||||
must define them (see `webui.ThemeTokens` for the required set, and the example's `css/app.css`
|
||||
for a working pair) plus `@custom-variant dark (&:where(.dark, .dark *));` — the built-in `dark`
|
||||
variant is a `prefers-color-scheme` media query, which a site with its own switch cannot use.
|
||||
Only genuinely *coloured* things (an alert's red tint) carry `dark:` variants. `webui.Theme` is
|
||||
the controller (`Toggle`, `ThemeToggle`, `Init`); `webui.ThemeBootScript` goes in the document
|
||||
head **before** the stylesheet, or dark-mode users get a white flash until the wasm loads. It is
|
||||
the only JavaScript in a gowasm app.
|
||||
|
||||
### web/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user