Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(themes): scope card-border and focus-shadow tokens to avoid clobbering
[._.]/ Adam Eivy4f967aceeb10
diff --git a/client/src/index.css b/client/src/index.cssindex dbf03a3b94..d6ebcf4efd 100644--- a/client/src/index.css+++ b/client/src/index.css@@ -138,7 +138,6 @@--port-card-surface-image: none;--port-card-surface-size: auto;--port-focus-shadow: 0 0 0 4px rgb(var(--port-focus-ring) / 0.2);- --port-field-focus-shadow: none;--port-nav-active-rule: none;/* `inherit`, not `none` — `text-shadow` is naturally inherited, and BlackICE's body-wide glow used to reach this element through that inheritance.@@ -888,17 +887,29 @@ html[data-port-theme] :is(box-shadow: var(--port-shadow-card);}-/* Card border tint + top wash, tokenized (#6248) — was 8 near-identical- per-theme selector blocks differing only in a border alpha and a- background-image. Scoped to the same narrow `.bg-port-card, /50` pair every- one of those blocks actually used (not the wide list above) so a theme that- never overrode these tokens renders byte-identical to before. */+/* Card top wash, tokenized (#6248) — was 8 near-identical per-theme selector+ blocks differing only in a border alpha and a background-image. The image+ half is safe to share unconditionally (default `none`/`auto` is a true+ no-op). The border half is NOT shared here — see the theme-scoped rule+ below: an unconditional `border-color` here would out-specificity a+ component's own semantic border class (`border-port-accent` for a+ "selected" card, `border-port-error`, …) on every theme, not just the ones+ that used to override it. */html[data-port-theme] :is(.bg-port-card, [class~="bg-port-card/50"]):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {- border-color: rgb(var(--port-card-border-color) / var(--port-card-border-alpha)) !important;background-image: var(--port-card-surface-image);background-size: var(--port-card-surface-size);}+/* Card border tint, tokenized (#6248) — scoped to the exact themes that+ overrode it before (specificity matters here: this selector shape is what+ let the theme tint win over `.border-port-border` while still losing to a+ component's own semantic border class at equal specificity elsewhere). A+ theme not listed here never applied this override and still doesn't. */+html:is([data-port-theme="lumen-glass"], [data-port-theme="lumen-glass-day"], [data-port-theme="black-ice-terminal"], [data-port-theme="black-ice-terminal-day"], [data-port-theme-family="kestrel"])+ :is(.bg-port-card, [class~="bg-port-card/50"]):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {+ border-color: rgb(var(--port-card-border-color) / var(--port-card-border-alpha)) !important;+}+html[data-port-theme] :is(.shadow-lg, .shadow-xl, .shadow-2xl) {box-shadow: var(--port-shadow-elevated) !important;}@@ -1629,13 +1640,18 @@ a:focus-visible,box-shadow: var(--port-focus-shadow);}-/* Field focus shadow, tokenized (#6248) — was 3 per-theme copies of the same- `:is(input, textarea, select):focus, button:focus-visible, a:focus-visible`- block. The button/link half is `--port-focus-shadow` above (shared, not- per-theme-duplicated to begin with); `--port-field-focus-shadow` covers- fields, which have no box-shadow by default (`none`), unlike buttons. */-:is(input, textarea, select):focus {- box-shadow: var(--port-field-focus-shadow);+/* Field + button/link focus glow, tokenized (#6248) — was 3 per-theme copies+ of this exact `:is(input, textarea, select):focus, button:focus-visible,+ a:focus-visible` block. Kept theme-scoped rather than folded into the bare+ `button:focus-visible` rule above: that rule's specificity is lower than+ `.bg-port-accent`'s `box-shadow: var(--port-shadow-interactive)`, so an+ accent-colored button would lose its focus glow to the interactive shadow.+ Restoring the original per-theme selector shape (specificity, not the+ values) keeps these three themes' stronger glow winning, same as before. */+html:is([data-port-theme="lumen-glass"], [data-port-theme="lumen-glass-day"], [data-port-theme="kestrel-neon"]) :is(input, textarea, select):focus,+html:is([data-port-theme="lumen-glass"], [data-port-theme="lumen-glass-day"], [data-port-theme="kestrel-neon"]) button:focus-visible,+html:is([data-port-theme="lumen-glass"], [data-port-theme="lumen-glass-day"], [data-port-theme="kestrel-neon"]) a:focus-visible {+ box-shadow: var(--port-focus-shadow);}/* DRY pointer cursor for interactive elements. Tailwind v4 dropped thediff --git a/client/src/themes/portosThemes.js b/client/src/themes/portosThemes.jsindex b942545786..e0ac18f43d 100644--- a/client/src/themes/portosThemes.js+++ b/client/src/themes/portosThemes.js@@ -294,7 +294,6 @@ export const THEMES = {'--port-font-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",'--port-card-border-alpha': '0.28','--port-focus-shadow': '0 0 0 4px rgb(var(--port-focus-ring) / 0.18), 0 0 36px rgb(var(--port-focus-ring) / 0.12)',- '--port-field-focus-shadow': '0 0 0 4px rgb(var(--port-focus-ring) / 0.18), 0 0 36px rgb(var(--port-focus-ring) / 0.12)','--port-shadow-card': '0 22px 55px rgb(0 0 0 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.08)','--port-shadow-elevated': '0 28px 80px rgb(0 0 0 / 0.42), inset 0 1px 0 rgb(255 255 255 / 0.12)','--port-shadow-interactive': '0 0 0 1px rgb(var(--port-accent) / 0.18), 0 0 28px rgb(var(--port-accent) / 0.12)',@@ -379,7 +378,6 @@ export const THEMES = {'--port-font-mono': "'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",'--port-card-border-alpha': '0.22','--port-focus-shadow': '0 0 0 3px rgb(var(--port-focus-ring) / 0.22), 0 0 24px rgb(var(--port-focus-ring) / 0.16)',- '--port-field-focus-shadow': '0 0 0 3px rgb(var(--port-focus-ring) / 0.22), 0 0 24px rgb(var(--port-focus-ring) / 0.16)','--port-shadow-card': 'inset 0 1px 0 0 rgb(255 255 255 / 0.6), 0 10px 30px -12px rgb(8 80 110 / 0.16), 0 2px 6px -2px rgb(8 80 110 / 0.08)','--port-shadow-elevated': 'inset 0 1px 0 0 rgb(255 255 255 / 0.7), 0 22px 56px -16px rgb(8 80 110 / 0.24), 0 6px 14px -4px rgb(8 80 110 / 0.12)','--port-shadow-interactive': '0 0 0 1px rgb(var(--port-accent) / 0.3), 0 0 28px rgb(var(--port-accent) / 0.16)',@@ -807,7 +805,6 @@ export const THEMES = {'--port-overlay-alpha': '0.8','--port-heading-glow': '0 0 12px rgb(var(--port-accent) / 0.5)','--port-focus-shadow': '0 0 0 1px rgb(var(--port-focus-ring) / 0.7), 0 0 18px rgb(var(--port-focus-ring) / 0.35)',- '--port-field-focus-shadow': '0 0 0 1px rgb(var(--port-focus-ring) / 0.7), 0 0 18px rgb(var(--port-focus-ring) / 0.35)','--port-code-glow': '0 0 8px rgb(var(--port-accent) / 0.25)','--port-nav-active-glow': '0 0 8px rgb(var(--port-accent) / 0.6)','--port-shadow-card': '0 0 0 1px rgb(var(--port-accent-2) / 0.14), 0 0 34px rgb(var(--port-accent-2) / 0.08), inset 0 0 48px rgb(0 0 0 / 0.45)',diff --git a/docs/themes/README.md b/docs/themes/README.mdindex 96ccc27a9e..f04d709b71 100644--- a/docs/themes/README.md+++ b/docs/themes/README.md@@ -79,7 +79,9 @@ Black ICE Terminal (both modes) uses `scanlines`; Kestrel Neon uses all five, an## Surface & control tokens-The same "tokens over per-theme selector blocks" pattern covers the shared card/focus/nav/code rules: `--port-card-border-color` and `--port-card-border-alpha` (a card's border, `rgb(var(--port-card-border-color) / var(--port-card-border-alpha))`, defaulted to `var(--port-border)` / `var(--port-border-alpha)` so an unset theme matches the plain `.border-port-border` rule) plus `--port-card-surface-image` and `--port-card-surface-size` (a card's `background-image`/`background-size`, both a no-op by default); `--port-focus-shadow` (button/link `:focus-visible` box-shadow) and `--port-field-focus-shadow` (form-field `:focus` box-shadow, `none` by default — fields get no glow unless a theme opts in); `--port-nav-active-rule` (the active sidebar link's `border-left`) and `--port-nav-active-glow` (its `text-shadow`, defaulted to `inherit` rather than `none` since `text-shadow` is naturally inherited — Black ICE's body-wide glow reaches the active link through that); and `--port-code-glow` (a `text-shadow` on `pre`/`code`/`textarea`/`input`, `none` by default). `caret-color: rgb(var(--port-accent))` on that same selector is unconditional — every theme gets an accent-colored text cursor, not just Kestrel.+The same "tokens over per-theme selector blocks" pattern covers the shared card/focus/nav/code rules — with one twist: `border-color` and `box-shadow` are properties a component can also set for its own reasons (a card's "selected"/"error" border class, an accent button's interactive shadow), so a theme's override has to keep winning against those *without* also winning for every theme that never opted in. Where that matters, the token-driven rule stays scoped to the exact theme(s) that use it (`html:is([data-port-theme="…"], …) …`) rather than becoming unconditional — same values-not-selectors win, without a specificity regression.++`--port-card-surface-image` / `--port-card-surface-size` (a card's `background-image`/`background-size`, both a no-op by default) are safe to share unconditionally. `--port-card-border-color` / `--port-card-border-alpha` (a card's border, `rgb(var(--port-card-border-color) / var(--port-card-border-alpha))`) are read by a rule scoped to the themes that override them (Lumen Glass, Black ICE Terminal both modes, Kestrel both modes — Lumen Glass Day's wider `bg-port-card/NN` coverage is its own selector, predating this rule). `--port-focus-shadow` (button/link/field focus box-shadow) is read by the shared `button:focus-visible` rule for its default, and by the same theme-scoped pattern for Lumen Glass, Lumen Glass Day, and Kestrel Neon — unscoped, it would lose to `.bg-port-accent`'s interactive shadow on an accent-colored button. `--port-nav-active-rule` (the active sidebar link's `border-left`) and `--port-nav-active-glow` (its `text-shadow`, defaulted to `inherit` rather than `none` since `text-shadow` is naturally inherited — Black ICE's body-wide glow reaches the active link through that) are shared unconditionally; `border-left` and `text-shadow` aren't properties any component sets on that element today. `--port-code-glow` (a `text-shadow` on `pre`/`code`/`textarea`/`input`, `none` by default) is likewise unconditional. `caret-color: rgb(var(--port-accent))` on that same selector is unconditional too — every theme gets an accent-colored text cursor, not just Kestrel.## New Feature Checklist