feat(examples/gastro): migrate website to Tailwind v4
Rewrite every .gastro template from the hand-rolled BEM-ish
styles.css to a Tailwind v4 utility-first build. The compiled
`static/styles.css` is regenerated by a //go:generate directive
and stays committed so the Dockerfile and `gastro generate`
keep working without a Node toolchain at build time.
Tooling
- Pin `github:tailwindlabs/tailwindcss = v4.3.0` in mise.toml
(standalone binary, no Node runtime).
- Add `examples/gastro/generate.go` with two //go:generate
directives: tailwindcss build, then `gastro generate`. One
`go generate ./...` rebuilds both surfaces in source order.
- Add `scripts/dev/example-website` mise task for the hot-reload
loop (`gastro watch --build tailwindcss --build go-build --run`).
CSS source
- New `examples/gastro/tailwind.css` is the source of truth.
@theme ports the palette + font + radius tokens 1:1 from the
old :root block (so utilities like bg-accent / max-w-site /
font-display work directly). `--breakpoint-sm` and
`--breakpoint-md` are overridden to 600px / 900px so templates
use plain sm:/md: modifiers without arbitrary media queries.
- @layer components keeps a small set of unavoidable patterns:
.btn family, .code-block, .feature-card, .docs-nav family,
.spinner, .htmx-indicator (toggled by htmx.js at runtime),
.alert-success/.alert-error, mermaid hide-during-init, and
.prose-md (hand-rolled markdown styling — no
@tailwindcss/typography plugin, per AGENTS.md 3rd-party policy).
- Markdown-rendered docs content is wrapped in `prose-md` by
docs-layout.gastro, scoping the prose styles cleanly.
Templates
- All 6 components and 4 leaf pages rewritten to utilities. The
8 docs/*.gastro pages were untouched — they only use
.docs-nav* which stayed as a component class.
- Mermaid theme JS in components/layout.gastro hard-codes the
same hex literals declared in @theme; the sync comment now
points at tailwind.css @theme instead of :root.
CI gate
- `go generate ./... && git diff --exit-code` in
examples/gastro/, added as a step in the existing `test` job.
Catches drift in static/styles.css. Verified reproducible.
Docs
- docs/contributing.md (hardlinked into examples/gastro/docs/)
documents the rebuild command and the mise dev task.
Verification
- mise run lint, mise run test (-race), and the new CI gate all
pass clean. Browser checks via playwright-cli: home, docs/sse,
all three guestbook examples, mobile breakpoint, prev/next nav.
Zero console errors. Datastar SSE search-as-you-type filters
the entry list correctly.