oficina / estilo Public

The door draws its own links

Calendar, Memoria, Calls and Fichas style no bare <a>, so the card's
links ("Use a different address", the open-source foot) were the
browser's #0000EE. A link in the card is the app's colour at the lowest
specificity, so a link drawn as a button keeps the button's; the foot's
is quiet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 9c0e35adb7ae717dd46687abf9cb63d277c1f734 parent 4120143
2 files changed, +18 −0
  • chrome/chrome.css +7 −0
  • chrome/chrome_test.go +11 −0

CI passed — run details

CI log
=== modcache ===
all modules verified
=== vet ===
CGO_ENABLED=0 go vet ./...
=== 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.003s
ok  	amadan.net/oficina/estilo.git/brand	0.002s
ok  	amadan.net/oficina/estilo.git/busy	0.002s
ok  	amadan.net/oficina/estilo.git/callui	0.003s
ok  	amadan.net/oficina/estilo.git/chrome	0.181s
?   	amadan.net/oficina/estilo.git/cmd/oficina-notices	[no test files]
ok  	amadan.net/oficina/estilo.git/credits	0.005s
ok  	amadan.net/oficina/estilo.git/credits/catalog	0.005s
ok  	amadan.net/oficina/estilo.git/homeconnect	0.005s
ok  	amadan.net/oficina/estilo.git/internal/lint	0.005s
?   	amadan.net/oficina/estilo.git/internal/tokencheck	[no test files]
ok  	amadan.net/oficina/estilo.git/menu	0.008s
ok  	amadan.net/oficina/estilo.git/savestatus	0.078s
ok  	amadan.net/oficina/estilo.git/sky	0.021s
ok  	amadan.net/oficina/estilo.git/theme	0.006s
diff --git a/chrome/chrome.css b/chrome/chrome.css
index 1ff46e3..3f18736 100644
--- a/chrome/chrome.css
+++ b/chrome/chrome.css
@@ -244,3 +244,10 @@
[estilo-signin] { padding: 26px 22px 24px; }
}
[estilo-signin-foot] { margin-block-start: var(--rst-sp-6); font-size: var(--rst-fs-xs); color: var(--rst-text-muted); }
+/* The door's links are drawn here, not left to the app: an app whose own
+ CSS styles no bare <a> showed the browser's blue on the card. A link in
+ the card is the app's colour, at the lowest specificity so a link
+ drawn as a button keeps the button's; the foot's is quiet, like its text. */
+:where([estilo-signin]) a { color: var(--rst-accent); text-underline-offset: 0.2em; }
+[estilo-signin-foot] a { color: inherit; }
+[estilo-signin-foot] a:hover { color: var(--rst-text); }
diff --git a/chrome/chrome_test.go b/chrome/chrome_test.go
index 05913d6..61e9a91 100644
--- a/chrome/chrome_test.go
+++ b/chrome/chrome_test.go
@@ -479,3 +479,14 @@ func TestSignInIsTheOficinaDoor(t *testing.T) {
t.Error("a sign-in with no Sky drew one")
}
}
+
+// The card styles its own links: an app that styles no bare <a> would
+// otherwise show the browser's default blue on the door.
+func TestTheDoorStylesItsLinks(t *testing.T) {
+ src := string(CSS())
+ for _, want := range []string{":where([estilo-signin]) a", "[estilo-signin-foot] a"} {
+ if !strings.Contains(src, want) {
+ t.Errorf("chrome.css does not style %q", want)
+ }
+ }
+}