oficina / docs Public

Docs: every glow much fainter in dark mode

Paul: in dark mode the glows need to be a lot more subtle. Pointer
light, sheen, card rim and wash, the index's top glow and the
toolbar's hover light take dark values at roughly half or less, and
the press bloom scales by --docs-bloom-k (0.4 in dark).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 489163a6fbc9977794c0eb54909c5af8ed7a36cd parent f97f7c8
3 files changed, +17 −13
  • internal/docs/brand/light.css +15 −11
  • internal/docs/views/list.html +1 −1
  • internal/docs/views/show.html +1 −1

CI passed — run details

diff --git a/internal/docs/brand/light.css b/internal/docs/brand/light.css
index 37dacc4..5317d26 100644
--- a/internal/docs/brand/light.css
+++ b/internal/docs/brand/light.css
@@ -1,4 +1,5 @@
-/* The light, for Docs: the values rastrillo's depth styles read (its
+/* The light, for Docs (in dark, every glow far fainter: light on a dark
+ surface reads much brighter than on a light one, Paul 2026-11-10): the values rastrillo's depth styles read (its
day theme's names, ui/themes/day.css), which estilo's Calma does not
declare yet, and the same light on Docs' own controls. Positions come
from rastrillo's light.js (its buttons and cards) and from
@@ -6,23 +7,26 @@
back to the still design. Hover-only, and under (hover: hover), so a
touch screen never holds a light where a finger lifted. */
:root {
- --rst-sheen-fill: light-dark(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
- --rst-sheen-plain: light-dark(color-mix(in srgb, var(--rst-accent) 10%, transparent), rgba(255, 255, 255, 0.05));
- --rst-light-rim: light-dark(color-mix(in srgb, var(--rst-accent) 38%, var(--rst-line)), color-mix(in srgb, var(--rst-accent) 40%, #505050));
- --rst-light-wash: light-dark(color-mix(in srgb, var(--rst-accent) 4%, transparent), rgba(255, 255, 255, 0.025));
+ --rst-sheen-fill: light-dark(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035));
+ --rst-sheen-plain: light-dark(color-mix(in srgb, var(--rst-accent) 10%, transparent), rgba(255, 255, 255, 0.025));
+ --rst-light-rim: light-dark(color-mix(in srgb, var(--rst-accent) 38%, var(--rst-line)), color-mix(in srgb, var(--rst-accent) 18%, #4a4a4a));
+ --rst-light-wash: light-dark(color-mix(in srgb, var(--rst-accent) 4%, transparent), rgba(255, 255, 255, 0.01));
/* The bloom's light, as an rgb triplet so its alpha can follow the
press: rgb(var() / calc()) works in every engine, where a
color-mix() whose percentage carried calc(var()) blanked Safari
(rastrillo's tokens.css, on its own press). Docs' accent, light and
dark. */
--docs-bloom: 46 91 180;
+ /* How strong every press bloom is: 1 in light, much less in dark,
+ where light on a dark surface reads far brighter (Paul). */
+ --docs-bloom-k: 1;
/* The pool of light a pointer casts on the control it is over. */
- --docs-light-tint: light-dark(color-mix(in srgb, var(--rst-accent) 10%, transparent), color-mix(in srgb, var(--rst-accent) 16%, transparent));
+ --docs-light-tint: light-dark(color-mix(in srgb, var(--rst-accent) 10%, transparent), color-mix(in srgb, var(--rst-accent) 6%, transparent));
}
/* Dark, a triplet, so a selector and a media query rather than
light-dark(), which takes only colours. */
-:root[data-theme="dark"] { --docs-bloom: 135 177 253; }
-@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --docs-bloom: 135 177 253; } }
+:root[data-theme="dark"] { --docs-bloom: 135 177 253; --docs-bloom-k: 0.4; }
+@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --docs-bloom: 135 177 253; --docs-bloom-k: 0.4; } }
/* A press is press in and bloom (Paul, from the press lab): the
control gives a little under the press and springs back on release,
@@ -39,7 +43,7 @@
initial-value: 0;
}
:root {
- --docs-flare: radial-gradient(calc(24px + var(--docs-press, 0) * 76px) circle at var(--rst-px, 50%) var(--rst-py, 50%), rgb(var(--docs-bloom) / calc(var(--docs-press, 0) * 0.16)), transparent 72%);
+ --docs-flare: radial-gradient(calc(24px + var(--docs-press, 0) * 76px) circle at var(--rst-px, 50%) var(--rst-py, 50%), rgb(var(--docs-bloom) / calc(var(--docs-press, 0) * 0.16 * var(--docs-bloom-k))), transparent 72%);
--docs-release: --docs-press 0.7s cubic-bezier(0.2, 0.6, 0.3, 1), scale 0.42s cubic-bezier(0.3, 1.6, 0.5, 1);
}
[docs-tool],
@@ -65,12 +69,12 @@
bloom goes in the face, white on a filled button, and they give under
the press the same way, keeping their own transitions. */
[rst-btn] {
- --rst-btn-face: radial-gradient(calc(24px + var(--rst-press, 0) * 96px) circle at var(--rst-px, 50%) var(--rst-py, 50%), rgb(var(--docs-bloom) / calc(var(--rst-press, 0) * 0.14)), transparent 72%);
+ --rst-btn-face: radial-gradient(calc(24px + var(--rst-press, 0) * 96px) circle at var(--rst-px, 50%) var(--rst-py, 50%), rgb(var(--docs-bloom) / calc(var(--rst-press, 0) * 0.14 * var(--docs-bloom-k))), transparent 72%);
}
[rst-btn~="primary"],
[rst-btn~="danger"] {
--rst-btn-face:
- radial-gradient(calc(24px + var(--rst-press, 0) * 96px) circle at var(--rst-px, 50%) var(--rst-py, 50%), rgb(255 255 255 / calc(var(--rst-press, 0) * 0.22)), transparent 72%),
+ radial-gradient(calc(24px + var(--rst-press, 0) * 96px) circle at var(--rst-px, 50%) var(--rst-py, 50%), rgb(255 255 255 / calc(var(--rst-press, 0) * 0.22 * var(--docs-bloom-k))), transparent 72%),
linear-gradient(rgb(255 255 255 / var(--rst-depth-face, 0)), rgb(0 0 0 / var(--rst-depth-face, 0)));
}
[rst-btn] {
diff --git a/internal/docs/views/list.html b/internal/docs/views/list.html
index 329dc0a..65c23dd 100644
--- a/internal/docs/views/list.html
+++ b/internal/docs/views/list.html
@@ -87,7 +87,7 @@
body:has([docs-list]) {
background:
radial-gradient(ellipse 70rem 28rem at 50% -6rem,
- light-dark(oklch(0.86 0.06 262 / 0.55), oklch(0.42 0.08 262 / 0.35)),
+ light-dark(oklch(0.86 0.06 262 / 0.55), oklch(0.42 0.08 262 / 0.16)),
transparent 70%)
no-repeat,
var(--rst-bg);
diff --git a/internal/docs/views/show.html b/internal/docs/views/show.html
index 6954207..22ccece 100644
--- a/internal/docs/views/show.html
+++ b/internal/docs/views/show.html
@@ -964,7 +964,7 @@
background-color: var(--rst-surface-2);
background-image:
var(--docs-flare),
- radial-gradient(40px circle at var(--rst-mx, 50%) var(--rst-my, 50%), color-mix(in srgb, var(--rst-accent) 18%, transparent), transparent 75%);
+ radial-gradient(40px circle at var(--rst-mx, 50%) var(--rst-my, 50%), light-dark(color-mix(in srgb, var(--rst-accent) 18%, transparent), color-mix(in srgb, var(--rst-accent) 8%, transparent)), transparent 75%);
}
/* aria-pressed is the state, and colour is not allowed to be the only
thing that shows it (§10.3, and AGENTS.md's "no exemptions").