oficina / estilo Public

theme: Calma follows rastrillo v0.38.0's fallbacks (focus edge, ghost hover)

Fiesta 1.5.0 (rastrillo v0.38.0) moved two fallbacks. --rst-focus-edge now
falls back to the accent, part of the single focus ring Paul approved.
--rst-ghost-face-hover has two fallbacks, so Calma keeps transparent at
:root and sets surface-2 on [estilo-signin-screen], not in print. AGENTS.md
now states the rule: an app on rastrillo v0.29-v0.37 (Docs, Equipo, Fichas,
Mapa) bumps rastrillo to v0.38.0 in the same change as estilo, or a focused
field shows two accent rings.

Reviewed by Claude Fable: APPROVE AFTER FIXES, fixes in dbf4634. CI passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from fix/calma-rastrillo-038-tokens into main.
Co-Authored-By: claude <claude~paul@keymail.dev>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 487cadb03b887c49aac7f49c390724f9a8007a56 parent 14a3d52
4 files changed, +75 −16
  • AGENTS.md +41 −6
  • theme/estilo.css +30 −7
  • theme/testdata/rastrillo-day-tokens.txt +3 −2
  • theme/theme_test.go +1 −1

CI passed — run details

CI log
=== modcache ===
all modules verified
=== vet ===
CGO_ENABLED=0 go vet ./...
CGO_ENABLED=0 go vet -tags browser ./...
=== fmt ===
=== build ===
CGO_ENABLED=0 go build -buildvcs=false ./...
=== go-test ===
CGO_ENABLED=0 go test -count=1 ./...
ok  	amadan.net/oficina/estilo.git/base	0.005s
ok  	amadan.net/oficina/estilo.git/brand	0.003s
ok  	amadan.net/oficina/estilo.git/busy	0.009s
ok  	amadan.net/oficina/estilo.git/callui	0.004s
ok  	amadan.net/oficina/estilo.git/chrome	2.921s
?   	amadan.net/oficina/estilo.git/cmd/oficina-notices	[no test files]
ok  	amadan.net/oficina/estilo.git/colophon	0.022s
ok  	amadan.net/oficina/estilo.git/credits	0.005s
ok  	amadan.net/oficina/estilo.git/credits/catalog	0.004s
ok  	amadan.net/oficina/estilo.git/desk	0.004s
ok  	amadan.net/oficina/estilo.git/googleimport	1.495s
ok  	amadan.net/oficina/estilo.git/homeconnect	0.005s
ok  	amadan.net/oficina/estilo.git/internal/lint	0.006s
?   	amadan.net/oficina/estilo.git/internal/tokencheck	[no test files]
ok  	amadan.net/oficina/estilo.git/menu	0.010s
ok  	amadan.net/oficina/estilo.git/savestatus	0.149s
ok  	amadan.net/oficina/estilo.git/sky	0.032s
ok  	amadan.net/oficina/estilo.git/theme	0.012s
diff --git a/AGENTS.md b/AGENTS.md
index fea53fd..1719011 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -115,16 +115,51 @@ What Calma is, and where each part lives:
a rastrillo upgrade that adds or drops a token still fails here. Two
sources: the pinned v0.23.0's `day`, live, and the newest rastrillo an
app pins, as a snapshot in `theme/testdata/rastrillo-day-tokens.txt`
- (v0.37.0 since 2026-11-20). A snapshot, because requiring a newer
+ (v0.38.0 since 2026-11-20, when Home moved to it; v0.37.0 before).
+ A snapshot, because requiring a newer
rastrillo here would pull every app up to it. When an app moves to a
newer rastrillo, regenerate the snapshot from that release's `day`.
The 69 tokens rastrillo added between v0.23.0 and v0.37.0 (Fiesta's
fills, controls, tints, switches, type, and depth, light and sheen)
- are declared at **the fallback v0.37.0's `tokens.css` uses for each**,
- so rastrillo's own stylesheet draws exactly what it did. That
- equality was checked by hand against v0.37.0 (Fiesta 1.3.0) only;
- nothing pins it, so re-check it whenever the snapshot is regenerated
- (Fiesta 1.5.0, for one, falls back `--rst-focus-edge` to the accent).
+ are declared at **the fallback the snapshot release's `tokens.css`
+ uses for each**, so rastrillo's own stylesheet draws exactly what it
+ would with none declared. v0.38.0 (Fiesta 1.5.0) declares the same 69
+ names; the equality was re-checked by script against its `tokens.css`
+ (every `var(--rst-…, fallback)`, by use site), and two had moved:
+ - `--rst-focus-edge` falls back to the accent, not
+ `--rst-line-strong`: Fiesta 1.5.0's one focus ring turns the field's
+ edge to it with the 2px accent outline flush on it. Calma now
+ declares `var(--rst-accent)`. Every rastrillo from **v0.29.0 to
+ v0.37.0** also reads `--rst-focus-edge` but draws its outline 2px off
+ the edge, so under this Calma a focused field shows **two accent
+ rings**. v0.28.0 and earlier don't read it and are unaffected.
+ - `--rst-ghost-face-hover` has two fallbacks: `transparent` for a
+ ghost button's hover, `--rst-surface-2` for the one-way sign-in
+ door's quiet controls. Calma keeps `transparent` at `:root` and sets
+ `--rst-surface-2` on the smart door (`[estilo-signin-screen]`,
+ estilo's hook, because the partial's `rst-` names are rastrillo's).
+ Two consequences, both deliberate:
+ - **Inside that screen, every ghost button** the partial draws gets
+ the pill on hover, not only the one-way door's. The classic door's
+ "Use a different email" (any rastrillo before v0.38.0, or v0.38.0
+ with `SigninOneWay` off) hovers with a full-width `surface-2` bar
+ where its own fallback is `transparent`. That's a deviation from
+ "each use site draws its fallback", accepted because no tighter
+ selector exists without `rst-` names.
+ - **Outside that screen,** the partial's one-way small controls get
+ `transparent`: the text still darkens on hover and focus, but
+ there's no pill. Drawing the door through `estilo-signin-screen` is
+ the convention that gives the pill; nothing enforces it.
+
+ **The rule: bump estilo and rastrillo together.** An app on rastrillo
+ v0.29.0 to v0.37.0 (on 2026-11-20: Docs v0.29.2, Equipo v0.30.3,
+ Fichas and Mapa v0.35.1) must move to rastrillo **v0.38.0 or later in
+ the same change** that bumps estilo past this commit. Apps on v0.28.0
+ or earlier (Sheets, Slides, Calendar, Calls and Memoria, all v0.27.1)
+ read neither token's new fallback and can bump estilo alone. Check an
+ app's pin with `git show origin/main:go.mod`.
+ Nothing pins the equality, so re-check it whenever the snapshot is
+ regenerated.
**An app's own CSS can still change** if it reads one of these tokens
with a different fallback: Fichas' `frame.css` reads
`var(--rst-rail-bg, var(--rst-bg))`, so its rail turns
diff --git a/theme/estilo.css b/theme/estilo.css
index 37b466f..6a086a8 100644
--- a/theme/estilo.css
+++ b/theme/estilo.css
@@ -87,12 +87,14 @@
/* ── Tokens rastrillo added after v0.23.0 ──────────────────────────
rastrillo v0.37.0 (its look from Fiesta 1.3.0) has day declare these
- 69 tokens beyond the set Calma was built on. Each is set to the
- fallback rastrillo v0.37.0's tokens.css uses where it reads it, so
- rastrillo's own stylesheet draws exactly what it did before they were
- declared, and the gate (TestDeclaresRastrilloTokens) stays strict. An
- app's CSS that reads one of these with a different fallback of its
- own does change (Fichas' rail; AGENTS.md, Theme).
+ 69 tokens beyond the set Calma was built on; v0.38.0 (Fiesta 1.5.0)
+ declares the same 69. Each is set to the fallback rastrillo v0.38.0's
+ tokens.css uses where it reads it, so rastrillo's own stylesheet draws
+ exactly what it would with none declared, and the gate
+ (TestDeclaresRastrilloTokens) stays strict. Two moved at v0.38.0:
+ --rst-focus-edge (below) and --rst-ghost-face-hover (after this
+ block). An app's CSS that reads one of these with a different
+ fallback of its own does change (Fichas' rail; AGENTS.md, Theme).
Adopting Fiesta's depth, light and sheen, or any value here other
than its fallback, is a separate design decision for Paul (AGENTS.md,
Theme), not a pin bump. */
@@ -128,7 +130,12 @@
--rst-summary-radius: 0;
/* Focus, hover and press tints. */
- --rst-focus-edge: var(--rst-line-strong);
+ /* The field's edge on focus. Fiesta 1.5.0 draws one focus ring: the
+ edge turns to this, and the 2px accent outline sits flush on it. Its
+ fallback moved from --rst-line-strong to the accent at v0.38.0, and
+ the one ring depends on it (a grey edge under an accent outline reads
+ as two). */
+ --rst-focus-edge: var(--rst-accent);
--rst-focus-halo: transparent;
--rst-tint-hover: var(--rst-accent-soft);
--rst-tint-press: var(--rst-accent-soft);
@@ -179,6 +186,22 @@
--rst-nav-current-fg: var(--rst-accent);
}
+/* --rst-ghost-face-hover has two fallbacks in rastrillo v0.38.0's
+ tokens.css: a ghost button's hover reads it with `transparent`, and the
+ one-way sign-in door's quiet controls (Other ways to sign in, Back, Use
+ a different email) with --rst-surface-2, the soft pill under them on
+ hover and focus. One value at :root cannot be both, so the smart door
+ (chrome's estilo-signin-screen) gets its own. Every ghost button inside
+ that screen gets the pill, and the door drawn outside it gets none
+ (AGENTS.md, Theme). Keyed on estilo's hook, not the partial's rst-
+ names, which are rastrillo's (AGENTS.md, Vocabulary). Not in print,
+ where Fiesta clears hover faces. */
+@media not print {
+ [estilo-signin-screen] {
+ --rst-ghost-face-hover: var(--rst-surface-2);
+ }
+}
+
/* The whole toggle. Setting color-scheme re-resolves every light-dark()
above, so an explicit choice beats the OS in both directions without
restating a colour. */
diff --git a/theme/testdata/rastrillo-day-tokens.txt b/theme/testdata/rastrillo-day-tokens.txt
index 03c64f0..7e24730 100644
--- a/theme/testdata/rastrillo-day-tokens.txt
+++ b/theme/testdata/rastrillo-day-tokens.txt
@@ -1,5 +1,6 @@
-# The custom-property names rastrillo v0.37.0's day theme declares
-# (ui.ThemeCSS("day"), Fiesta 1.3.0's css/themes/day.css), one per line.
+# The custom-property names rastrillo v0.38.0's day theme declares
+# (ui.ThemeCSS("day"), Fiesta 1.5.0's css/themes/day.css), one per line.
+# The same names as v0.37.0's (Fiesta 1.3.0); regenerated 2026-11-20.
# A snapshot, because estilo pins rastrillo v0.23.0 and must not require a
# newer one: estilo's apps would all be pulled up with it. Regenerate it
# from the newest rastrillo an Oficina app pins, then declare whatever it
diff --git a/theme/theme_test.go b/theme/theme_test.go
index 4ef5039..1a2ed3c 100644
--- a/theme/theme_test.go
+++ b/theme/theme_test.go
@@ -120,7 +120,7 @@ func names(css []byte) []string {
// pins rastrillo v0.23.0 while its apps run newer ones:
//
// - day at the pinned v0.23.0, read live through ui.ThemeCSS;
-// - day at the newest rastrillo an app pins (v0.37.0 today), from the
+// - day at the newest rastrillo an app pins (v0.38.0 today), from the
// snapshot testdata/rastrillo-day-tokens.txt. Estilo cannot import
// that rastrillo: requiring it here would pull every app up to it.
//