Merge branch 'signin-foot-link' into main
Merge signin-foot-link: the door draws its own links
2 files changed,
+19
−0
chrome/chrome.css+8 −0chrome/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.005s ok amadan.net/oficina/estilo.git/brand 0.004s ok amadan.net/oficina/estilo.git/busy 0.003s ok amadan.net/oficina/estilo.git/callui 0.007s ok amadan.net/oficina/estilo.git/chrome 0.442s ? amadan.net/oficina/estilo.git/cmd/oficina-notices [no test files] ok amadan.net/oficina/estilo.git/credits 0.010s ok amadan.net/oficina/estilo.git/credits/catalog 0.012s ok amadan.net/oficina/estilo.git/homeconnect 0.009s ok amadan.net/oficina/estilo.git/internal/lint 0.012s ? amadan.net/oficina/estilo.git/internal/tokencheck [no test files] ok amadan.net/oficina/estilo.git/menu 0.015s ok amadan.net/oficina/estilo.git/savestatus 0.125s ok amadan.net/oficina/estilo.git/sky 0.050s ok amadan.net/oficina/estilo.git/theme 0.009s
diff --git a/chrome/chrome.css b/chrome/chrome.css| index 1ff46e3..6bda384 100644 |
| --- a/chrome/chrome.css |
| +++ b/chrome/chrome.css |
| @@ -244,3 +244,11 @@ |
| [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 that does |
| + not link base.css (Calendar, Memoria, Calls, Fichas) showed the browser's |
| + blue on the card. As base.css does, 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.15em; } |
| +[estilo-signin-foot] a { color: inherit; } |
| +[estilo-signin-foot] a:hover, [estilo-signin-foot] a:focus-visible { 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) |
| + } |
| + } |
| +} |