@import "tailwindcss"; /* Generates the full Material Design 3 colour system from one seed colour. See https://github.com/SantaClaas/material-tailwind — not Material UI. */ @plugin "@claas.dev/material-tailwind" { source-color: #f05033; } /* The plugin emits every colour as `light-dark(, )`, so the whole theme follows the system preference without a single `dark:` variant — but only if `color-scheme` is declared. */ @layer base { :root { color-scheme: light dark; } /* The app fills the window and never scrolls as a whole; individual panes scroll themselves. Every element in the chain needs the height or the percentage has nothing to resolve against. */ html, body, #root { height: 100%; } body { overflow: hidden; } /* Safari drops list semantics when a list is given `list-style: none`, which Tailwind's preflight does — and Tauri is WKWebView on macOS, so that is the default here, not a corner case. An empty string marker renders nothing but leaves the list a list, which beats patching the role back on with ARIA at every list in the app. */ ol, ul { list-style-type: ""; } } /* The lane a graph line or dot belongs to. Registered so it is typed as a number, which is what lets it drive the hue calculation below. */ @property --lane { syntax: ""; inherits: true; initial-value: 0; } @theme { /* Must match the constants in GraphLanes.tsx, which builds the SVG paths. */ --row-height: 28px; } @layer components { /* Ten lane colours from one formula rather than ten hard-coded values: the lane index rotates the hue, starting near the seed colour so the graph belongs to the same palette as everything else. Lightness and chroma differ between schemes because a colour readable on white is not readable on near-black. */ .graph-line, .graph-dot { --hue: calc(25 + var(--lane) * 36); color: light-dark(oklch(52% 0.17 var(--hue)), oklch(78% 0.15 var(--hue))); } .graph-line { fill: none; stroke: currentcolor; stroke-width: 2; stroke-linecap: round; } .graph-dot { fill: currentcolor; } /* A merge reads as a ring, so it is distinguishable from an ordinary commit without relying on size alone. */ .graph-dot-merge { fill: var(--color-surface); stroke: currentcolor; stroke-width: 3; } /* Rows past the first screenful are skipped until they are scrolled near. `none` for the width keeps an off-screen row from collapsing horizontally, which would make the scroll width jump about on a wide graph. Using nth-child means no JavaScript decides what is on screen — and the first rows, the ones that must paint immediately, are deliberately left out of it. */ .history-list > li:nth-child(n + 40) { content-visibility: auto; contain-intrinsic-size: auto none auto var(--row-height); } }