Fork colours in the panes view: each branch's curve runs on into the rule under its panes' titles
Seven hues at one OKLCH lightness and a low chroma, light and dark, ordered so neighbours stay apart for red-green and blue-yellow colour blindness. The focused branch at full strength, the others fainter; the active pane's ink rule as before. A tab's foot and a dash on a spine carry the colour too. /colors line|top|edge|off (and the menu) choose the line, a band across each pane's top, one down its left edge, or none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
30957260ce
commit
9f4a5aae43
9 files changed
+105
-16
No files matched your search
@@ -450,6 +450,57 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
.curves path.on { stroke: var(--curve-on); }
|
||||
.curves path.lost { stroke-dasharray: 1 3; }
|
||||
|
||||
/*
|
||||
* Branch colours (forks.ts): a fork's panes and curves share a colour, a plain trail keeps one, and
|
||||
* the first trail has none. Seven hues at one OKLCH lightness and a low chroma, in an order that
|
||||
* keeps neighbours apart for red-green and blue-yellow colour blindness too. The focused branch's at
|
||||
* full strength, the others' fainter. Where it shows, by `/colors` (.panes[data-colors]): line, the
|
||||
* curve and the rule under the pane's title (its tab's foot, a dash on its spine); top, a band
|
||||
* across the pane's top; edge, a band down its left; off, nowhere. Never the pane's ground.
|
||||
*/
|
||||
:root {
|
||||
--hue-0: oklch(60% 0.1 75);
|
||||
--hue-1: oklch(60% 0.1 165);
|
||||
--hue-2: oklch(60% 0.1 300);
|
||||
--hue-3: oklch(60% 0.1 30);
|
||||
--hue-4: oklch(60% 0.1 210);
|
||||
--hue-5: oklch(60% 0.1 120);
|
||||
--hue-6: oklch(60% 0.1 255);
|
||||
--curve-ink: rgb(0 0 0 / 0.42);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--hue-0: oklch(74% 0.085 75);
|
||||
--hue-1: oklch(74% 0.085 165);
|
||||
--hue-2: oklch(74% 0.085 300);
|
||||
--hue-3: oklch(74% 0.085 30);
|
||||
--hue-4: oklch(74% 0.085 210);
|
||||
--hue-5: oklch(74% 0.085 120);
|
||||
--hue-6: oklch(74% 0.085 255);
|
||||
--curve-ink: rgb(255 255 255 / 0.42);
|
||||
}
|
||||
}
|
||||
[data-hue="0"] { --hue: var(--hue-0); }
|
||||
[data-hue="1"] { --hue: var(--hue-1); }
|
||||
[data-hue="2"] { --hue: var(--hue-2); }
|
||||
[data-hue="3"] { --hue: var(--hue-3); }
|
||||
[data-hue="4"] { --hue: var(--hue-4); }
|
||||
[data-hue="5"] { --hue: var(--hue-5); }
|
||||
[data-hue="6"] { --hue: var(--hue-6); }
|
||||
.panes:not([data-colors="off"]) :is(.pane, .curves path)[data-hue] { --branch: color-mix(in oklab, var(--hue) 70%, transparent); }
|
||||
.panes:not([data-colors="off"]) :is(.pane.on-branch, .curves path.on)[data-hue] { --branch: var(--hue); }
|
||||
.panes:not([data-colors="off"]) .curves path[data-hue] { stroke: var(--branch); }
|
||||
.panes:not([data-colors="off"]) .curves path.on:not([data-hue]) { stroke: var(--curve-ink); }
|
||||
/* line */
|
||||
[data-colors="line"] .pane[data-hue] > .pane-scroll > .pane-body > :is(.pane-head:not(.focused), .top:not(.focused) h1, .wiki:not(.embedded) > .wiki-head:not(.focused)) { border-bottom-color: var(--branch); }
|
||||
[data-colors="line"] .pane[data-hue] > .tabline { border-bottom-color: var(--branch); }
|
||||
[data-colors="line"] .pane[data-hue] > .spine::before { content: ""; position: absolute; top: 1.72rem; left: 50%; width: 0.9rem; margin-left: -0.45rem; height: 1px; background: var(--branch); }
|
||||
/* top: under the active pane's ink rule, above the focused branch's hairline */
|
||||
[data-colors="top"] .pane[data-hue] { background-image: linear-gradient(var(--branch), var(--branch)); background-size: 100% 2px; background-repeat: no-repeat; }
|
||||
[data-colors="top"] .pane[data-hue].on-branch:not(.active)::after { top: 2px; }
|
||||
/* edge */
|
||||
[data-colors="edge"] .pane[data-hue] { background-image: linear-gradient(var(--branch), var(--branch)); background-size: 2px 100%; background-position: 1px 0; background-repeat: no-repeat; }
|
||||
|
||||
/* A pane's head: a section heading, smaller than the page title the first pane keeps. */
|
||||
.pane-head { display: flex; align-items: baseline; gap: 0.6em; margin: 0 0 0.85rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--faint); cursor: pointer; }
|
||||
.pane-head.focused { border-bottom-color: var(--fg); }
|
||||
|
||||
Reference in new issue
Block a user