door: every card's buttons are pills (Paul, 2026-11-21)
The door's main action is a full-width pill, 44px, lit from above, its
shadow tinted by its fill (accent, or red for danger); secondary controls
are quiet text buttons centred under it, as rastrillo's one-way door
draws them. Paul approved the look on 2026-11-21 ("yes to pill buttons").
estilo's lint forbids [rst-btn~=...] selectors in estilo's CSS, so the
rules key on estilo's own hooks: a door sign-in form's submit
([estilo-signin-form] [type=submit]) is its main action, so the classic
form and every app's confirm step become pills on their next bump; a new
[estilo-signin-action] hook marks any other main action
(~="danger" for a destructive one, ~="quiet" for a secondary control);
Forget ([estilo-signin-forget]) is quiet and now centred. The smart door's
partial carries none of these hooks, so rastrillo's own pills are left
alone (TestTheDoorsButtonsArePills).
chrome.css's main hash is updated for the door's rules only; no bar rule
changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+85
−15
chrome/chrome.css+34 −7chrome/chrome_test.go+1 −1chrome/door_test.go+1 −1chrome/screen_test.go+44 −2chrome/templates/signin.html+1 −1chrome/unchanged_test.go+4 −3
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.004s 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.005s ok amadan.net/oficina/estilo.git/chrome 2.995s ? amadan.net/oficina/estilo.git/cmd/oficina-notices [no test files] ok amadan.net/oficina/estilo.git/colophon 0.023s 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.071s ok amadan.net/oficina/estilo.git/homeconnect 0.005s ok amadan.net/oficina/estilo.git/internal/lint 0.007s ? 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.131s ok amadan.net/oficina/estilo.git/sky 0.030s ok amadan.net/oficina/estilo.git/theme 0.011s
Intent
diff --git a/chrome/chrome.css b/chrome/chrome.css| index e6aa01b..ade46e8 100644 |
| --- a/chrome/chrome.css |
| +++ b/chrome/chrome.css |
| @@ -314,14 +314,41 @@ |
| [estilo-signin-screen] > section { display: block; inline-size: auto; max-inline-size: none; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; } |
| [estilo-signin-screen] > section > :first-child:not(:only-child):not(:has(h1)) { display: none; } |
| [estilo-signin] [estilo-signin-screen] h1 { margin: 0 0 2px; font-size: 1.75rem; font-weight: 620; letter-spacing: -0.02em; line-height: 1.15; } |
| -/* Signed out: "Forget me on this device", a quiet text button under Sign |
| - in, drawn as the smart door's small controls are (medium weight, the |
| - muted ink that darkens on hover, a touch smaller than body text, a soft |
| - pill on hover and focus). Pulled back by its own padding so its words |
| - line up with the card's text above. */ |
| +/* The door's buttons are the smart door's (Paul, 2026-11-21, "yes to pill |
| + buttons"), on every card the door draws. The card's main action is a |
| + full-width pill, 44px tall, lit from above, its shadow tinted by its |
| + fill: the accent's, or red for a danger button. Its secondary controls |
| + are quiet text buttons, centred under it: medium weight, the muted ink |
| + that darkens over a soft pill on hover and focus, a touch smaller than |
| + body text. rastrillo's one-way door already draws its own buttons this |
| + way; nothing here reaches it. |
| + |
| + Keyed on estilo's hooks, never on rastrillo's button attributes, which |
| + are rastrillo's to style (AGENTS.md, Vocabulary; internal/lint): |
| + - a door sign-in form's submit ([estilo-signin-form]) is its main |
| + action, so the classic form and every app's confirm step are pills; |
| + - [estilo-signin-action] marks any other main action on the card, and |
| + [estilo-signin-action~="danger"] a destructive one; |
| + - [estilo-signin-action~="quiet"] marks a secondary control, as the |
| + signed-out page's Forget ([estilo-signin-forget]) is. |
| + The button keeps its rastrillo variant for its fill and states; these |
| + rules give it the door's shape. A hidden button stays hidden. */ |
| +[estilo-signin] :is([estilo-signin-form] [type="submit"], [estilo-signin-action]:not([estilo-signin-action~="quiet"])):not([hidden]) { |
| + display: flex; inline-size: 100%; box-sizing: border-box; justify-content: center; align-items: center; |
| + min-block-size: 44px; padding-inline: 18px; border-radius: 999px; font-weight: 600; text-decoration: none; |
| + box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 1px 1px rgb(23 32 60 / 0.10), |
| + 0 8px 18px -8px var(--estilo-signin-glow, light-dark(color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 80%, transparent), color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 30%, transparent))); |
| +} |
| +[estilo-signin] [estilo-signin-action~="danger"] { |
| + --estilo-signin-glow: light-dark(color-mix(in srgb, var(--rst-danger-fill, var(--rst-tone-negative-fg)) 60%, transparent), color-mix(in srgb, var(--rst-danger-fill, var(--rst-tone-negative-fg)) 30%, transparent)); |
| +} |
| [estilo-signin-forget] { margin: var(--rst-sp-2) 0 0; } |
| -[estilo-signin-forget] > button { margin-inline-start: -0.875rem; min-block-size: 2.5rem; padding: 0 0.875rem; border-color: transparent; border-radius: 999px; background: transparent; box-shadow: none; color: var(--rst-text-muted); font-size: calc(var(--rst-fs-base) * 0.9375); font-weight: 500; } |
| -[estilo-signin-forget] > button:hover, [estilo-signin-forget] > button:focus-visible { background: var(--rst-surface-2); color: var(--rst-text); } |
| +[estilo-signin] :is([estilo-signin-action~="quiet"], [estilo-signin-forget] > button):not([hidden]) { |
| + display: flex; inline-size: fit-content; margin-inline: auto; justify-content: center; align-items: center; |
| + min-block-size: 2.5rem; padding: 0 0.875rem; border-color: transparent; border-radius: 999px; background: transparent; box-shadow: none; |
| + color: var(--rst-text-muted); font-size: calc(var(--rst-fs-base) * 0.9375); font-weight: 500; text-decoration: none; |
| +} |
| +[estilo-signin] :is([estilo-signin-action~="quiet"], [estilo-signin-forget] > button):is(:hover, :focus-visible) { background: var(--rst-ghost-face-hover, var(--rst-surface-2)); color: var(--rst-text); } |
| /* ── Bar stack (Docs' I2 editor header, spec 2026-11-11) ──────────────── |
| Everything below is opt-in. Each rule is keyed on a hook only a bar |
diff --git a/chrome/chrome_test.go b/chrome/chrome_test.go| index c7c126e..1bd6930 100644 |
| --- a/chrome/chrome_test.go |
| +++ b/chrome/chrome_test.go |
| @@ -333,7 +333,7 @@ func TestSignInPages(t *testing.T) { |
| t.Fatal("sent page", html) |
| } |
| html = render(t, "estilo-signed-out", SignInNotice{Icon: "/i.svg", Heading: label + "-out", Body: label + "-body", Link: &Link{Href: "/signin", Label: label + "-in"}}) |
| - if !strings.Contains(html, `<a rst-btn="primary" href="/signin">`+esc(label)+"-in") { |
| + if !strings.Contains(html, `<a rst-btn="primary" estilo-signin-action href="/signin">`+esc(label)+"-in") { |
| t.Fatal("signed-out page", html) |
| } |
| }) |
diff --git a/chrome/door_test.go b/chrome/door_test.go| index 8c8d452..8e1f331 100644 |
| --- a/chrome/door_test.go |
| +++ b/chrome/door_test.go |
| @@ -96,7 +96,7 @@ func TestTheDoorDrawsItsOwnCopy(t *testing.T) { |
| for _, want := range []string{ |
| "<h1>You’re signed out</h1>", |
| "<p estilo-signin-body>You’ve signed out of Calls on this device.</p>", |
| - `<a rst-btn="primary" href="/signin">Sign in</a>`, |
| + `<a rst-btn="primary" estilo-signin-action href="/signin">Sign in</a>`, |
| } { |
| if !strings.Contains(html, want) { |
| t.Errorf("signed-out lacks %q:\n%s", want, html) |
diff --git a/chrome/screen_test.go b/chrome/screen_test.go| index 2c4ff4d..c806d05 100644 |
| --- a/chrome/screen_test.go |
| +++ b/chrome/screen_test.go |
| @@ -172,7 +172,7 @@ func TestOficinaGlyph(t *testing.T) { |
| func TestSignedOutOffersForget(t *testing.T) { |
| n := SignInNotice{Icon: "/i.svg", App: "Docs"}.SignedOut("/signin").Forgetting("/auth/forget", "/d/abc", Hidden{"csrf", "tok"}) |
| html := render(t, "estilo-signed-out", n) |
| - want := ` <p><a rst-btn="primary" href="/signin">Sign in</a></p> |
| + want := ` <p><a rst-btn="primary" estilo-signin-action href="/signin">Sign in</a></p> |
| <form estilo-signin-forget method="post" action="/auth/forget"> |
| <input type="hidden" name="return_to" value="/d/abc"> |
| <input type="hidden" name="csrf" value="tok"> |
| @@ -196,11 +196,53 @@ func TestSignedOutOffersForget(t *testing.T) { |
| } |
| // Its look is the door's quiet control, and keys only on its own hook. |
| src := string(CSS()) |
| - if !strings.Contains(src, "[estilo-signin-forget] > button {") || !strings.Contains(src, "color: var(--rst-text-muted); font-size: calc(var(--rst-fs-base) * 0.9375); font-weight: 500; }") { |
| + if !strings.Contains(src, "[estilo-signin] :is([estilo-signin-action~=\"quiet\"], [estilo-signin-forget] > button):not([hidden]) {") || !strings.Contains(src, "color: var(--rst-text-muted); font-size: calc(var(--rst-fs-base) * 0.9375); font-weight: 500;") { |
| t.Error("chrome.css does not draw Forget as a quiet text button") |
| } |
| } |
| +// Every card the door draws has pill buttons (Paul, 2026-11-21, "yes to |
| +// pill buttons"): the main action a full-width pill, secondary controls |
| +// quiet text buttons. chrome.css reaches them by estilo's hooks only, so |
| +// estilo's own cards must carry them, and the smart door's partial, which |
| +// rastrillo already draws as pills, must carry none. |
| +func TestTheDoorsButtonsArePills(t *testing.T) { |
| + src := string(CSS()) |
| + for _, want := range []string{ |
| + `[estilo-signin] :is([estilo-signin-form] [type="submit"], [estilo-signin-action]:not([estilo-signin-action~="quiet"])):not([hidden]) {`, |
| + "min-block-size: 44px; padding-inline: 18px; border-radius: 999px; font-weight: 600;", |
| + "inset 0 1px 0 rgb(255 255 255 / 0.22)", |
| + `[estilo-signin] [estilo-signin-action~="danger"] {`, |
| + "--estilo-signin-glow: light-dark(color-mix(in srgb, var(--rst-danger-fill", |
| + } { |
| + if !strings.Contains(src, want) { |
| + t.Errorf("chrome.css lacks %q", want) |
| + } |
| + } |
| + // The classic form's one submit is the form's main action. |
| + form := render(t, "estilo-signin", SignIn{Icon: "/i.svg", Action: "/signin"}) |
| + if !regexp.MustCompile(`(?s)<form rst-form estilo-signin-form .*<button rst-btn="primary" type="submit">Sign in</button>.*</form>`).MatchString(form) { |
| + t.Errorf("the sign-in form's submit is not where the pill rule looks for it:\n%s", form) |
| + } |
| + if n := strings.Count(form, `type="submit"`); n != 1 { |
| + t.Errorf("the sign-in form has %d submits; the pill rule makes each one the main action", n) |
| + } |
| + // Signed out: Sign in is the main action, Forget the quiet one. |
| + out := render(t, "estilo-signed-out", SignInNotice{Icon: "/i.svg", App: "Docs"}.SignedOut("/signin").Forgetting("/auth/forget", "")) |
| + for _, want := range []string{`<a rst-btn="primary" estilo-signin-action href="/signin">`, "<form estilo-signin-forget"} { |
| + if !strings.Contains(out, want) { |
| + t.Errorf("signed-out lacks %q:\n%s", want, out) |
| + } |
| + } |
| + // The smart door's buttons are rastrillo's: no estilo hook reaches them. |
| + screen := renderScreen(t, "estilo-signin-screen", docsScreen(standInState{})) |
| + for _, hook := range []string{"estilo-signin-action", "estilo-signin-form", "estilo-signin-forget"} { |
| + if strings.Contains(screen, hook) { |
| + t.Errorf("the smart door carries %s, so estilo's pill rules would restyle rastrillo's buttons:\n%s", hook, screen) |
| + } |
| + } |
| +} |
| + |
| // A copy set that leaves Forget empty still draws a named button: the |
| // label falls back to English's at render time. |
| func TestForgetIsNeverUnnamed(t *testing.T) { |
diff --git a/chrome/templates/signin.html b/chrome/templates/signin.html| index a89fc4d..80a9066 100644 |
| --- a/chrome/templates/signin.html |
| +++ b/chrome/templates/signin.html |
| @@ -94,7 +94,7 @@ |
| <h1>{{.Heading}}</h1> |
| <p estilo-signin-body>{{.Body}}</p> |
| {{- with .Link}} |
| - <p><a rst-btn="primary" href="{{.Href}}">{{.Label}}</a></p> |
| + <p><a rst-btn="primary" estilo-signin-action href="{{.Href}}">{{.Label}}</a></p> |
| {{- end}} |
| {{- with .Forget}} |
| <form estilo-signin-forget method="post" action="{{.Action}}"> |
diff --git a/chrome/unchanged_test.go b/chrome/unchanged_test.go| index 6a86205..2437006 100644 |
| --- a/chrome/unchanged_test.go |
| +++ b/chrome/unchanged_test.go |
| @@ -76,10 +76,11 @@ const barStackMarker = "\n/* ── Bar stack" |
| // app is a design decision: make it deliberately, and update these with |
| // the reason in the commit. chrome.css's was last updated on |
| // feat/smart-door, for the door's rules only (the footer slot removed; |
| -// the smart door and the signed-out page's Forget added): no bar rule |
| -// changed. |
| +// the smart door and the signed-out page's Forget added), and again on |
| +// feat/door-pills, for the door's rules only (the door's buttons drawn as |
| +// pills, Paul 2026-11-21): no bar rule changed. |
| const ( |
| - mainChromeCSS = "7191f4df53e675cc6920eb9efd84393e68e696c4ee8fae818bbb56c058ed1cfb" |
| + mainChromeCSS = "94f890f79fc851e05f7ee96bb02147aa34596781ef5727ee41fc45bd9bbf9620" |
| mainMenuCSS = "6b3435a18591d20ad62b40df3e64e159b501f9d1c183b2f42aa32b4faa9c0669" |
| ) |