diff --git a/docs/decisions.md b/docs/decisions.md
index ef96d47..435ea8c 100644
--- a/docs/decisions.md
+++ b/docs/decisions.md
@@ -204,3 +204,54 @@ details are in `docs/theme.md`. This replaces the spec's original
- **Freshness:** ages within a day, week or month get warmer colours.
- **Stylesheet cache-busting:** the CSS (and `copy.js`) URLs carry a hash of
`style.css`, so caches never serve a stale stylesheet.
+
+## Polish pass 3
+
+### Phase 1: contrast and type
+
+All changes are in part 2 of `style.css`. Saturn's tokens in part 1 are
+untouched, and every new value is a `color-mix()` of them, so ink, wine,
+plum, teal and flexoki get the same steps as moss.
+
+- **Layers, darkest first:** `--page` (background-dark 55% toward black),
+ `--box` (60% background-dark, 40% surface), then `--box-head` and `--hover`
+ (surface with 4–5% of the heading colour). The latest-commit strip and
+ README table headers use `--box-head` too. Box edges use `--edge`, which is
+ brighter than saturn's `--borders`. Dividers inside boxes use the softer
+ `--rule`, and controls use `--line`.
+- **Text:** `--body-text` (45% body, 55% headings) for body copy,
+ descriptions and the tree's commit column. File names, repo names, commit
+ subjects and counts use `--text-headings` at weight 500–600, and
+ `--text-secondary` is kept for metadata. Ages, sizes, counts and stats use
+ tabular figures. "No description." on repo cards stays dim
+ (`repo-card-desc--none`).
+- **Accent:** `--accent-bright` (accent 82%, white 18%) is used for hovers,
+ active tabs, breadcrumb links, the profile name, the 404 and one shared
+ `:focus-visible` ring (`a`, `button`, `summary`, `input`). `--accent` stays
+ for fills: the primary button, the heatmap, the language bar and the
+ `:target` line edge.
+- **Depth:** boxes and repo cards get `--depth` (a faint top highlight plus
+ a soft drop shadow), and box heads repeat the highlight, since their
+ background hides the box's. The profile avatar has a faint accent glow made
+ of two spread box-shadows. It sits only behind the avatar, with no gradient
+ behind text.
+- **Contrast:** `web/contrast_test.go` reads the tokens from `style.css`,
+ evaluates the `color-mix()` chains in OKLab and fails below 4.5:1. Run
+ `go test -v -run Contrast ./web` to see the ratios. At the time of writing:
+
+ | text on | moss | ink | wine | plum | teal | flexoki |
+ | -------------------- | ----- | ----- | ----- | ----- | ----- | ------- |
+ | headings / page | 17.68 | 17.79 | 17.82 | 17.83 | 17.68 | 18.08 |
+ | headings / box-head | 11.20 | 12.12 | 12.35 | 12.59 | 11.12 | 13.62 |
+ | body / box | 12.68 | 13.30 | 13.45 | 13.56 | 12.64 | 14.62 |
+ | body / hover | 10.40 | 11.25 | 11.45 | 11.68 | 10.32 | 12.61 |
+ | secondary / page | 7.45 | 7.49 | 7.51 | 7.51 | 7.45 | 7.61 |
+ | secondary / box | 5.90 | 6.18 | 6.25 | 6.30 | 5.88 | 6.79 |
+ | secondary / box-head | 4.72 | 5.11 | 5.20 | 5.30 | 4.68 | 5.74 |
+ | secondary / hover | 4.83 | 5.23 | 5.32 | 5.43 | 4.80 | 5.86 |
+ | accent-bright / box | 7.94 | 7.33 | 7.69 | 7.98 | 8.30 | 7.61 |
+
+ The tightest pair is metadata on box heads in teal and moss (about 4.7:1).
+ That's why heads and hovers only take 4–5% of the heading colour. Line
+ numbers keep saturn's dimmed look (opacity 0.55) and are exempt, as
+ decoration next to the code.
diff --git a/testdata/golden/index.html b/testdata/golden/index.html
index b552975..a5e2bef 100644
--- a/testdata/golden/index.html
+++ b/testdata/golden/index.html
@@ -5,8 +5,8 @@
Daniel Daum
-
-
+
+
skip to content
@@ -66,7 +66,7 @@
repo-b
- No description.
+ No description.
Shell
Updated 3 months ago
diff --git a/testdata/golden/repo-a/blob/README.md.html b/testdata/golden/repo-a/blob/README.md.html
index 1986c18..4482a35 100644
--- a/testdata/golden/repo-a/blob/README.md.html
+++ b/testdata/golden/repo-a/blob/README.md.html
@@ -5,8 +5,8 @@
README.md · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/blob/big.txt.html b/testdata/golden/repo-a/blob/big.txt.html
index d69d37c..55dcc73 100644
--- a/testdata/golden/repo-a/blob/big.txt.html
+++ b/testdata/golden/repo-a/blob/big.txt.html
@@ -5,8 +5,8 @@
big.txt · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/blob/cmd/hello/main.go.html b/testdata/golden/repo-a/blob/cmd/hello/main.go.html
index 94c4dff..8956852 100644
--- a/testdata/golden/repo-a/blob/cmd/hello/main.go.html
+++ b/testdata/golden/repo-a/blob/cmd/hello/main.go.html
@@ -5,8 +5,8 @@
cmd/hello/main.go · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/blob/data.bin.html b/testdata/golden/repo-a/blob/data.bin.html
index 31ace2b..fe19fe3 100644
--- a/testdata/golden/repo-a/blob/data.bin.html
+++ b/testdata/golden/repo-a/blob/data.bin.html
@@ -5,8 +5,8 @@
data.bin · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/blob/docs/logo.png.html b/testdata/golden/repo-a/blob/docs/logo.png.html
index 1a19540..5105190 100644
--- a/testdata/golden/repo-a/blob/docs/logo.png.html
+++ b/testdata/golden/repo-a/blob/docs/logo.png.html
@@ -5,8 +5,8 @@
docs/logo.png · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/branches/index.html b/testdata/golden/repo-a/branches/index.html
index 615aad1..b4a4e35 100644
--- a/testdata/golden/repo-a/branches/index.html
+++ b/testdata/golden/repo-a/branches/index.html
@@ -5,8 +5,8 @@
branches · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/commit-latest.html b/testdata/golden/repo-a/commit-latest.html
index 0496a01..184883b 100644
--- a/testdata/golden/repo-a/commit-latest.html
+++ b/testdata/golden/repo-a/commit-latest.html
@@ -5,8 +5,8 @@
Add changelog · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/index.html b/testdata/golden/repo-a/index.html
index 58640fc..028e987 100644
--- a/testdata/golden/repo-a/index.html
+++ b/testdata/golden/repo-a/index.html
@@ -6,8 +6,8 @@
repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/log/index.html b/testdata/golden/repo-a/log/index.html
index 6845515..1771866 100644
--- a/testdata/golden/repo-a/log/index.html
+++ b/testdata/golden/repo-a/log/index.html
@@ -5,8 +5,8 @@
commits · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/packages/index.html b/testdata/golden/repo-a/packages/index.html
index 13ac217..196e061 100644
--- a/testdata/golden/repo-a/packages/index.html
+++ b/testdata/golden/repo-a/packages/index.html
@@ -5,8 +5,8 @@
packages · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/pulls/index.html b/testdata/golden/repo-a/pulls/index.html
index 1e7ed5d..e7f9eff 100644
--- a/testdata/golden/repo-a/pulls/index.html
+++ b/testdata/golden/repo-a/pulls/index.html
@@ -5,8 +5,8 @@
pulls · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/releases/index.html b/testdata/golden/repo-a/releases/index.html
index 0661171..a871dfe 100644
--- a/testdata/golden/repo-a/releases/index.html
+++ b/testdata/golden/repo-a/releases/index.html
@@ -5,8 +5,8 @@
releases · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/tags/index.html b/testdata/golden/repo-a/tags/index.html
index ac1959a..255426c 100644
--- a/testdata/golden/repo-a/tags/index.html
+++ b/testdata/golden/repo-a/tags/index.html
@@ -5,8 +5,8 @@
tags · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/tree/cmd/hello/index.html b/testdata/golden/repo-a/tree/cmd/hello/index.html
index 394fa74..93cbfe2 100644
--- a/testdata/golden/repo-a/tree/cmd/hello/index.html
+++ b/testdata/golden/repo-a/tree/cmd/hello/index.html
@@ -5,8 +5,8 @@
cmd/hello · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-a/tree/docs/index.html b/testdata/golden/repo-a/tree/docs/index.html
index fb854ec..b540e95 100644
--- a/testdata/golden/repo-a/tree/docs/index.html
+++ b/testdata/golden/repo-a/tree/docs/index.html
@@ -5,8 +5,8 @@
docs · repo-a
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-b/index.html b/testdata/golden/repo-b/index.html
index 150ba11..c1f9b6c 100644
--- a/testdata/golden/repo-b/index.html
+++ b/testdata/golden/repo-b/index.html
@@ -5,8 +5,8 @@
repo-b
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-b/log/index.html b/testdata/golden/repo-b/log/index.html
index 9b001f9..2a21857 100644
--- a/testdata/golden/repo-b/log/index.html
+++ b/testdata/golden/repo-b/log/index.html
@@ -5,8 +5,8 @@
commits · repo-b
-
-
+
+
skip to content
diff --git a/testdata/golden/repo-b/releases/index.html b/testdata/golden/repo-b/releases/index.html
index ced568a..5171dca 100644
--- a/testdata/golden/repo-b/releases/index.html
+++ b/testdata/golden/repo-b/releases/index.html
@@ -5,8 +5,8 @@
releases · repo-b
-
-
+
+
skip to content
diff --git a/web/contrast_test.go b/web/contrast_test.go
new file mode 100644
index 0000000..d2ec8fa
--- /dev/null
+++ b/web/contrast_test.go
@@ -0,0 +1,227 @@
+package web
+
+import (
+ "fmt"
+ "math"
+ "regexp"
+ "strconv"
+ "strings"
+ "testing"
+)
+
+// TestContrast checks that text tokens meet WCAG AA (4.5:1) on the layers
+// they sit on, in every palette. It reads the tokens from style.css: saturn's
+// moss values from `html {`, each `[data-theme]` override, then the derived
+// daum.dev tokens in part 2's `:root {`, and evaluates their color-mix()
+// chains in OKLab like a browser does. Run with -v to print the ratios.
+func TestContrast(t *testing.T) {
+ css, err := FS.ReadFile("static/style.css")
+ if err != nil {
+ t.Fatal(err)
+ }
+ s := string(css)
+ part2 := strings.Index(s, "part 2: daum.dev only")
+ if part2 < 0 {
+ t.Fatal("no part 2 marker in style.css")
+ }
+ base := block(t, s, "\nhtml {")
+ derived := block(t, s[part2:], ":root {")
+
+ pairs := []struct{ fg, bg string }{
+ {"--text-headings", "--page"}, {"--text-headings", "--box"}, {"--text-headings", "--box-head"}, {"--text-headings", "--hover"},
+ {"--body-text", "--page"}, {"--body-text", "--box"}, {"--body-text", "--box-head"}, {"--body-text", "--hover"},
+ {"--text-secondary", "--page"}, {"--text-secondary", "--box"}, {"--text-secondary", "--box-head"},
+ {"--text-secondary", "--hover"}, {"--text-secondary", "--surface"}, {"--text-secondary", "--background-dark"},
+ {"--accent-bright", "--page"}, {"--accent-bright", "--box"}, {"--accent-bright", "--hover"},
+ {"--accent", "--page"}, {"--background-dark", "--accent"},
+ {"--syn-constant", "--box"}, {"--add", "--box"}, {"--del", "--box"},
+ }
+ var report strings.Builder
+ fmt.Fprintf(&report, "%-18s %-18s", "text", "on")
+ themes := []string{"moss", "ink", "wine", "plum", "teal", "flexoki"}
+ for _, th := range themes {
+ fmt.Fprintf(&report, " %7s", th)
+ }
+ report.WriteString("\n")
+ for _, p := range pairs {
+ fmt.Fprintf(&report, "%-18s %-18s", p.fg, p.bg)
+ for _, th := range themes {
+ vars := map[string]string{}
+ for k, v := range base {
+ vars[k] = v
+ }
+ if th != "moss" {
+ for k, v := range block(t, s, `[data-theme="`+th+`"] {`) {
+ vars[k] = v
+ }
+ }
+ for k, v := range derived {
+ vars[k] = v
+ }
+ r := ratio(eval(t, vars, "var("+p.fg+")"), eval(t, vars, "var("+p.bg+")"))
+ fmt.Fprintf(&report, " %7.2f", r)
+ if r < 4.5 {
+ t.Errorf("%s: %s on %s is %.2f:1, below 4.5:1", th, p.fg, p.bg, r)
+ }
+ }
+ report.WriteString("\n")
+ }
+ t.Log("contrast ratios\n" + report.String())
+}
+
+var declRe = regexp.MustCompile(`(--[\w-]+)\s*:\s*([^;]+);`)
+
+// block returns the custom properties declared in the first rule that
+// starts with head.
+func block(t *testing.T, s, head string) map[string]string {
+ t.Helper()
+ i := strings.Index(s, head)
+ if i < 0 {
+ t.Fatalf("style.css has no %q block", head)
+ }
+ body := s[i+len(head):]
+ body = body[:strings.Index(body, "}")]
+ vars := map[string]string{}
+ for _, m := range declRe.FindAllStringSubmatch(body, -1) {
+ vars[m[1]] = strings.TrimSpace(m[2])
+ }
+ return vars
+}
+
+type rgb [3]float64 // sRGB, 0..1
+
+// eval resolves a colour expression: var(), #hex, black, white and
+// color-mix(in oklab, …).
+func eval(t *testing.T, vars map[string]string, e string) rgb {
+ t.Helper()
+ e = strings.TrimSpace(e)
+ switch {
+ case strings.HasPrefix(e, "var("):
+ name := strings.TrimSuffix(strings.TrimPrefix(e, "var("), ")")
+ v, ok := vars[name]
+ if !ok {
+ t.Fatalf("unknown token %s", name)
+ }
+ return eval(t, vars, v)
+ case strings.HasPrefix(e, "#") && len(e) == 7:
+ var c rgb
+ for i := range c {
+ n, _ := strconv.ParseUint(e[1+2*i:3+2*i], 16, 8)
+ c[i] = float64(n) / 255
+ }
+ return c
+ case e == "black":
+ return rgb{}
+ case e == "white":
+ return rgb{1, 1, 1}
+ case strings.HasPrefix(e, "color-mix(in oklab,"):
+ args := split(e[len("color-mix(in oklab,") : len(e)-1])
+ if len(args) != 2 {
+ t.Fatalf("color-mix needs two colours: %s", e)
+ }
+ ca, pa := percent(args[0])
+ cb, pb := percent(args[1])
+ switch {
+ case pa < 0 && pb < 0:
+ pa, pb = 50, 50
+ case pa < 0:
+ pa = 100 - pb
+ case pb < 0:
+ pb = 100 - pa
+ }
+ if pa+pb != 100 {
+ t.Fatalf("color-mix percentages must add to 100 here: %s", e)
+ }
+ a, b := oklab(eval(t, vars, ca)), oklab(eval(t, vars, cb))
+ var m [3]float64
+ for i := range m {
+ m[i] = a[i]*pa/100 + b[i]*pb/100
+ }
+ return fromOklab(m)
+ }
+ t.Fatalf("can't evaluate colour %q", e)
+ return rgb{}
+}
+
+// split cuts at top-level commas.
+func split(s string) []string {
+ var out []string
+ depth, start := 0, 0
+ for i, r := range s {
+ switch r {
+ case '(':
+ depth++
+ case ')':
+ depth--
+ case ',':
+ if depth == 0 {
+ out = append(out, s[start:i])
+ start = i + 1
+ }
+ }
+ }
+ return append(out, s[start:])
+}
+
+// percent splits "var(--x) 40%" into the colour and 40, or -1 if absent.
+func percent(s string) (string, float64) {
+ s = strings.TrimSpace(s)
+ if i := strings.LastIndex(s, " "); i > 0 && strings.HasSuffix(s, "%") && !strings.Contains(s[i:], ")") {
+ p, err := strconv.ParseFloat(s[i+1:len(s)-1], 64)
+ if err == nil {
+ return strings.TrimSpace(s[:i]), p
+ }
+ }
+ return s, -1
+}
+
+func lin(c float64) float64 {
+ if c <= 0.04045 {
+ return c / 12.92
+ }
+ return math.Pow((c+0.055)/1.055, 2.4)
+}
+
+func gam(c float64) float64 {
+ c = math.Max(0, math.Min(1, c))
+ if c <= 0.0031308 {
+ return c * 12.92
+ }
+ return 1.055*math.Pow(c, 1/2.4) - 0.055
+}
+
+// oklab and fromOklab follow Björn Ottosson's reference matrices.
+func oklab(c rgb) [3]float64 {
+ r, g, b := lin(c[0]), lin(c[1]), lin(c[2])
+ l := math.Cbrt(0.4122214708*r + 0.5363325363*g + 0.0514459929*b)
+ m := math.Cbrt(0.2119034982*r + 0.6806995451*g + 0.1073969566*b)
+ s := math.Cbrt(0.0883024619*r + 0.2817188376*g + 0.6299787005*b)
+ return [3]float64{
+ 0.2104542553*l + 0.7936177850*m - 0.0040720468*s,
+ 1.9779984951*l - 2.4285922050*m + 0.4505937099*s,
+ 0.0259040371*l + 0.7827717662*m - 0.8086757660*s,
+ }
+}
+
+func fromOklab(c [3]float64) rgb {
+ l := math.Pow(c[0]+0.3963377774*c[1]+0.2158037573*c[2], 3)
+ m := math.Pow(c[0]-0.1055613458*c[1]-0.0638541728*c[2], 3)
+ s := math.Pow(c[0]-0.0894841775*c[1]-1.2914855480*c[2], 3)
+ return rgb{
+ gam(4.0767416621*l - 3.3077115913*m + 0.2309699292*s),
+ gam(-1.2684380046*l + 2.6097574011*m - 0.3413193965*s),
+ gam(-0.0041960863*l - 0.7034186147*m + 1.7076147010*s),
+ }
+}
+
+func luminance(c rgb) float64 {
+ return 0.2126*lin(c[0]) + 0.7152*lin(c[1]) + 0.0722*lin(c[2])
+}
+
+func ratio(a, b rgb) float64 {
+ la, lb := luminance(a), luminance(b)
+ if la < lb {
+ la, lb = lb, la
+ }
+ return (la + 0.05) / (lb + 0.05)
+}
diff --git a/web/static/style.css b/web/static/style.css
index 11bab10..7f90e44 100644
--- a/web/static/style.css
+++ b/web/static/style.css
@@ -1430,17 +1430,64 @@ footer nav a,
--pixel: "Geist Pixel", ui-monospace, monospace;
--radius: 10px;
--radius-sm: 6px;
- --box: color-mix(in oklab, var(--background-dark) 55%, var(--surface));
- --hover: color-mix(in oklab, var(--surface) 80%, var(--background-dark));
- --line: color-mix(in oklab, var(--borders) 75%, var(--text-secondary) 25%);
--add: var(--syn-string);
--del: var(--syn-variable);
+
+ /* layers, darkest first: a near-neutral page, tinted boxes, lighter
+ box heads and hovers. Derived from saturn's tokens, so every palette
+ gets the same steps. web/contrast_test.go checks the text on them. */
+ --page: color-mix(in oklab, var(--background-dark) 55%, black);
+ --box: color-mix(in oklab, var(--background-dark) 60%, var(--surface));
+ --box-head: color-mix(in oklab, var(--surface) 95%, var(--text-headings));
+ --hover: color-mix(in oklab, var(--surface) 96%, var(--text-headings));
+ --edge: color-mix(in oklab, var(--borders) 62%, var(--text-secondary));
+ --rule: color-mix(in oklab, var(--borders) 82%, var(--text-secondary));
+ --line: color-mix(in oklab, var(--borders) 58%, var(--text-secondary));
+
+ /* text: content near the heading colour, --text-secondary for metadata */
+ --body-text: color-mix(in oklab, var(--text-body) 45%, var(--text-headings));
+ --accent-bright: color-mix(in oklab, var(--accent) 82%, white);
+
+ /* depth: a faint top highlight and a soft drop shadow */
+ --highlight: inset 0 1px 0 rgb(255 255 255 / 0.045);
+ --depth: var(--highlight), 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.7);
}
body {
font-family: var(--ui);
font-size: 15px;
line-height: 1.55;
+ color: var(--body-text);
+ background-color: var(--page);
+}
+
+p {
+ color: var(--body-text);
+}
+
+/* names and numbers */
+time,
+.count,
+.stat,
+.f-size,
+.f-age,
+.lang-pct,
+.diffstat,
+.diff-summary,
+.file-stats,
+.repo-card-meta,
+.heat-body,
+.ln {
+ font-variant-numeric: tabular-nums;
+}
+
+/* one focus ring for everything interactive */
+a:focus-visible,
+button:focus-visible,
+summary:focus-visible,
+input:focus-visible {
+ outline: 2px solid var(--accent-bright);
+ outline-offset: 2px;
}
body.page--code {
@@ -1535,7 +1582,14 @@ img.ficon {
.avatar-xs { width: 20px; height: 20px; }
.avatar-sm { width: 24px; height: 24px; }
-.avatar-lg { width: 88px; height: 88px; box-shadow: 0 0 0 1px var(--borders); }
+.avatar-lg {
+ width: 88px;
+ height: 88px;
+ box-shadow:
+ 0 0 0 1px var(--edge),
+ 0 0 40px 6px color-mix(in oklab, var(--accent) 16%, transparent),
+ 0 0 90px 24px color-mix(in oklab, var(--accent) 7%, transparent);
+}
.avatar-none {
display: inline-grid;
@@ -1543,7 +1597,7 @@ img.ficon {
flex: none;
color: var(--text-secondary);
background: var(--surface);
- box-shadow: 0 0 0 1px var(--borders);
+ box-shadow: 0 0 0 1px var(--rule);
}
.avatar-none .icon {
@@ -1571,7 +1625,7 @@ img.ficon {
.button:hover,
a.chip:hover {
border-color: var(--accent-muted);
- color: var(--accent);
+ color: var(--accent-bright);
}
.button--small {
@@ -1619,7 +1673,7 @@ a.chip:hover {
.sha {
padding: 0.05rem 0.4rem;
- border: 1px solid var(--borders);
+ border: 1px solid var(--rule);
border-radius: 4px;
font-family: var(--mono);
font-size: 0.78rem;
@@ -1628,7 +1682,7 @@ a.chip:hover {
}
a.sha:hover {
- color: var(--accent);
+ color: var(--accent-bright);
border-color: var(--accent-muted);
}
@@ -1651,7 +1705,7 @@ a.sha:hover {
}
.copyfield input:focus-visible {
- outline: 2px solid var(--accent);
+ outline: 2px solid var(--accent-bright);
outline-offset: -1px;
}
@@ -1674,7 +1728,7 @@ a.sha:hover {
}
.copy:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
.copy .icon-check,
@@ -1690,9 +1744,10 @@ a.sha:hover {
/* boxes: the one container for listings, files, readmes and diffs */
.box {
margin-bottom: 1.25rem;
- border: 1px solid var(--borders);
+ border: 1px solid var(--edge);
border-radius: var(--radius);
background: var(--box);
+ box-shadow: var(--depth);
overflow: hidden;
}
@@ -1703,8 +1758,9 @@ a.sha:hover {
gap: 0.5rem 0.6rem;
margin: 0;
padding: 0.7rem 1rem;
- border-bottom: 1px solid var(--borders);
- background: var(--surface);
+ border-bottom: 1px solid var(--rule);
+ background: var(--box-head);
+ box-shadow: var(--highlight);
font-family: var(--ui);
font-size: 0.875rem;
font-weight: 600;
@@ -1739,7 +1795,7 @@ a.sha:hover {
}
.rows > li + li {
- border-top: 1px solid var(--borders);
+ border-top: 1px solid var(--rule);
}
.row {
@@ -1772,7 +1828,7 @@ a.sha:hover {
a.row-title:hover,
.row-title a:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
.row-title a {
@@ -1837,7 +1893,7 @@ a.row-title:hover,
.profile h1 {
margin: 0;
- color: var(--accent);
+ color: var(--accent-bright);
font-size: 1.9rem;
}
@@ -1917,9 +1973,10 @@ a.row-title:hover,
flex-direction: column;
gap: 0.4rem;
padding: 1rem;
- border: 1px solid var(--borders);
+ border: 1px solid var(--edge);
border-radius: var(--radius);
background: var(--box);
+ box-shadow: var(--depth);
transition: border-color 150ms ease, transform 150ms ease;
}
@@ -1941,15 +1998,19 @@ a.row-title:hover,
}
.repo-card:hover .repo-card-name {
- color: var(--accent);
+ color: var(--accent-bright);
}
.repo-card-desc {
flex: 1;
- color: var(--text-secondary);
+ color: var(--body-text);
font-size: 0.875rem;
}
+.repo-card-desc--none {
+ color: var(--text-secondary);
+}
+
.repo-card-meta {
display: flex;
flex-wrap: wrap;
@@ -1998,7 +2059,7 @@ a.row-title:hover,
}
.repo-title a:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
.repo-title .repo-owner {
@@ -2006,7 +2067,7 @@ a.row-title:hover,
}
.repo-slash {
- color: var(--borders);
+ color: var(--rule);
}
.repo-title .pill {
@@ -2017,7 +2078,7 @@ a.row-title:hover,
.repo-desc {
margin: 0.5rem 0 0;
font-size: 1rem;
- color: var(--text-body);
+ color: var(--body-text);
}
.topics {
@@ -2028,7 +2089,7 @@ a.row-title:hover,
padding: 0.15rem 0.65rem;
border-color: transparent;
background: color-mix(in oklab, var(--accent-muted) 35%, transparent);
- color: var(--accent);
+ color: var(--accent-bright);
font-size: 0.75rem;
letter-spacing: 0;
}
@@ -2057,7 +2118,7 @@ a.row-title:hover,
}
.repo-meta a:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
/* repo tabs */
@@ -2066,7 +2127,7 @@ a.row-title:hover,
gap: 0.25rem;
margin: 0 0 1.25rem;
overflow-x: auto;
- border-bottom: 1px solid var(--borders);
+ border-bottom: 1px solid var(--rule);
font-size: 0.9rem;
scrollbar-width: none;
}
@@ -2085,17 +2146,17 @@ a.row-title:hover,
.tabs a:hover {
color: var(--text-headings);
- border-bottom-color: var(--borders);
+ border-bottom-color: var(--rule);
}
.tabs a[aria-current="page"] {
color: var(--text-headings);
font-weight: 500;
- border-bottom-color: var(--accent);
+ border-bottom-color: var(--accent-bright);
}
.tabs a[aria-current="page"] .icon {
- color: var(--accent);
+ color: var(--accent-bright);
}
.count {
@@ -2103,8 +2164,9 @@ a.row-title:hover,
padding: 0 0.45rem;
border-radius: 999px;
background: var(--surface);
- color: var(--text-secondary);
+ color: var(--text-headings);
font-size: 0.75rem;
+ font-weight: 500;
text-align: center;
}
@@ -2115,7 +2177,7 @@ a.row-title:hover,
align-items: center;
gap: 0.6rem 1.25rem;
padding: 0.75rem 1rem;
- border-bottom: 1px solid var(--borders);
+ border-bottom: 1px solid var(--rule);
font-size: 0.875rem;
}
@@ -2139,7 +2201,7 @@ a.row-title:hover,
a.stat:hover,
a.stat:hover b {
- color: var(--accent);
+ color: var(--accent-bright);
}
/* clone menu: a , so it opens without js */
@@ -2190,8 +2252,8 @@ a.stat:hover b {
align-items: center;
gap: 0.5rem 0.75rem;
padding: 0.65rem 1rem;
- border-bottom: 1px solid var(--borders);
- background: var(--surface);
+ border-bottom: 1px solid var(--rule);
+ background: var(--box-head);
font-size: 0.875rem;
}
@@ -2204,13 +2266,14 @@ a.stat:hover b {
flex: 1 1 10rem;
min-width: 0;
overflow: hidden;
- color: var(--text-secondary);
+ color: var(--text-headings);
+ font-weight: 500;
white-space: nowrap;
mask-image: linear-gradient(to right, black calc(100% - 3rem), transparent);
}
.commit-msg:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
.box-commit time {
@@ -2244,7 +2307,7 @@ a.ci:hover {
}
.files tr + tr td {
- border-top: 1px solid var(--borders);
+ border-top: 1px solid var(--rule);
}
.files td {
@@ -2265,10 +2328,11 @@ a.ci:hover {
.f-name a,
.f-name span {
color: var(--text-headings);
+ font-weight: 500;
}
.f-name a:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
/* commit messages fade out instead of ending in an ellipsis */
@@ -2281,11 +2345,11 @@ a.ci:hover {
.f-msg a,
.f-msg span {
- color: var(--text-secondary);
+ color: var(--body-text);
}
.f-msg a:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
.f-size,
@@ -2380,7 +2444,7 @@ a.ci:hover {
}
.crumbs a {
- color: var(--accent);
+ color: var(--accent-bright);
}
.crumbs a:hover {
@@ -2413,8 +2477,13 @@ a.ci:hover {
border-bottom: 1px solid var(--accent-muted);
}
-.markdown h1 { font-size: 1.6rem; margin: 1.5rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--borders); }
-.markdown h2 { font-size: 1.25rem; margin: 1.75rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--borders); }
+:where(p, li, td, dd, blockquote, figcaption) > a:not([class]):hover {
+ color: var(--accent-bright);
+ border-bottom-color: var(--accent-bright);
+}
+
+.markdown h1 { font-size: 1.6rem; margin: 1.5rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule); }
+.markdown h2 { font-size: 1.25rem; margin: 1.75rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rule); }
.markdown h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.markdown img {
@@ -2438,11 +2507,11 @@ a.ci:hover {
.markdown th,
.markdown td {
padding: 0.4rem 0.75rem;
- border: 1px solid var(--borders);
+ border: 1px solid var(--rule);
}
.markdown th {
- background: var(--surface);
+ background: var(--box-head);
}
.markdown input[type="checkbox"] {
@@ -2510,7 +2579,7 @@ pre.code {
}
a.ln:hover {
- color: var(--accent);
+ color: var(--accent-bright);
opacity: 1;
}
@@ -2545,14 +2614,14 @@ a.ln:hover {
.commit-body {
margin: 0.75rem 0 0;
- color: var(--text-body);
+ color: var(--body-text);
font-size: 0.9rem;
white-space: pre-wrap;
}
.commit-meta {
margin-top: 0.75rem;
- border-top: 1px solid var(--borders);
+ border-top: 1px solid var(--rule);
border-bottom: 0;
}
@@ -2568,7 +2637,7 @@ a.ln:hover {
.checks {
margin: 0;
padding: 0.25rem 0;
- border-top: 1px solid var(--borders);
+ border-top: 1px solid var(--rule);
list-style: none;
font-size: 0.85rem;
}
@@ -2667,7 +2736,7 @@ a.ln:hover {
.assets {
margin: 0;
padding: 0;
- border-top: 1px solid var(--borders);
+ border-top: 1px solid var(--rule);
list-style: none;
font-size: 0.85rem;
}
@@ -2682,7 +2751,7 @@ a.ln:hover {
}
.assets li + li {
- border-top: 1px solid var(--borders);
+ border-top: 1px solid var(--rule);
}
.assets a {
@@ -2693,7 +2762,7 @@ a.ln:hover {
}
.assets a:hover {
- color: var(--accent);
+ color: var(--accent-bright);
}
/* pulls: each row opens its body, no js */
@@ -2718,7 +2787,7 @@ a.ln:hover {
}
.notfound h1 {
- color: var(--accent);
+ color: var(--accent-bright);
font-size: 4rem;
margin: 0;
}
diff --git a/web/templates/profile.html b/web/templates/profile.html
index 9ffcb06..91a8866 100644
--- a/web/templates/profile.html
+++ b/web/templates/profile.html
@@ -21,7 +21,7 @@
{{- range .Repos}}
{{template "icon" "book"}}{{.Name}}
- {{or .Description "No description."}}
+ {{if .Description}}{{.Description}} {{else}}No description. {{end}}
{{- with .Language}} {{.}} {{end}}
Updated {{ago .UpdatedAt}}