Side nav circle takes the color of the section being read

Green and amber sections give it their palette's lightest shade, teal
and deep teal the teal one (the darkest in dark mode), the shades the
nav's text reads on, easing between them as the reader scrolls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-01 03:56:33 -05:00
parent 1db18a8f91
commit 37c555a7b8
3 changed files with 54 additions and 7 deletions

View file

@ -0,0 +1,37 @@
/* The side nav's circle (PageShell.tsx): the light fill of the color
family of the section being read (its darkest in dark mode), the
palette shades every text color reads on at 4.5:1 or better, as
on the page backdrop (PageBackdrop.css). */
.side-nav-circle {
background: #d6f5fa;
transition: background-color 0.8s ease-in-out;
}
.side-nav-circle[data-family="green"] {
background: #e6f0dd;
}
.side-nav-circle[data-family="amber"] {
background: #fdf1d6;
}
/* Dark mode: the toggle's choice, or the system's when there is none. */
:root[data-theme="dark"] .side-nav-circle {
background: #003a45;
}
:root[data-theme="dark"] .side-nav-circle[data-family="green"] {
background: #23361a;
}
:root[data-theme="dark"] .side-nav-circle[data-family="amber"] {
background: #4a2e00;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .side-nav-circle {
background: #003a45;
}
:root:not([data-theme="light"]) .side-nav-circle[data-family="green"] {
background: #23361a;
}
:root:not([data-theme="light"]) .side-nav-circle[data-family="amber"] {
background: #4a2e00;
}
}