Give the right-click menu the darkest surface and Oxide's selection

The menu now sits on the darkest surface (the frame color) behind a faint
border, and its highlighted item takes Oxide's selected style: a dark green
fill (their surface-accent) with green text. Mouse and keyboard share that
one highlight, so a hovered row and a keyboard-selected row can no longer
light up at the same time.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-10-05 10:29:22 +02:00
co-authored by Claude
parent bfc2147c77
commit 9bd237d89c
3 changed files with 15 additions and 4 deletions
+5
View File
@@ -317,6 +317,11 @@ headers `--toolbar-3` (`color-mix` steps declared once in `:root`, so every
theme follows) — then `--background` (file lists, editor text, forms; theme follows) — then `--background` (file lists, editor text, forms;
`--row-alt` stripes odd file rows, skipped on the cursor/selected row so two `--row-alt` stripes odd file rows, skipped on the cursor/selected row so two
`bg-*` utilities never fight) and `--card` (popovers, dialogs, toasts). The `bg-*` utilities never fight) and `--card` (popovers, dialogs, toasts). The
right-click menu is the exception: the darkest surface (`bg-chrome`) behind a
faint `border-border/60`, and its highlighted item takes Oxide's selected style —
`--primary-surface` fill (Oxide surface-accent: green-200 dark, green-1200
light) with `text-primary`; mouse and keyboard share that one highlight
(`activeIndex`). The
ACTIVE panel is marked by a 0.125rem `--primary` line along its top edge (an ACTIVE panel is marked by a 0.125rem `--primary` line along its top edge (an
inset box-shadow on the session strip, so switching panels never shifts inset box-shadow on the session strip, so switching panels never shifts
layout). Dark: frame 0.162 < list 0.195 < header 0.275 → 0.248 → 0.221 < card layout). Dark: frame 0.162 < list 0.195 < header 0.275 → 0.248 → 0.221 < card
+5 -4
View File
@@ -43,11 +43,11 @@ const EDGE_GAP = 6; // px on purpose: a viewport-edge margin, not a UI size
(keydown)="onKeydown($event)" (keydown)="onKeydown($event)"
[style.left.px]="position().x" [style.left.px]="position().x"
[style.top.px]="position().y" [style.top.px]="position().y"
class="fixed z-50 w-56 border border-border bg-card py-1 text-card-foreground shadow-xl outline-none" class="fixed z-50 w-56 border border-border/60 bg-chrome py-1 text-foreground shadow-xl outline-none"
> >
@for (item of req.items; track $index) { @for (item of req.items; track $index) {
@if (item.type === 'separator') { @if (item.type === 'separator') {
<div class="my-1 border-t border-border"></div> <div class="my-1 border-t border-border/60"></div>
} @else { } @else {
<button <button
type="button" type="button"
@@ -55,10 +55,11 @@ const EDGE_GAP = 6; // px on purpose: a viewport-edge margin, not a UI size
[attr.id]="'ctx-item-' + $index" [attr.id]="'ctx-item-' + $index"
[title]="item.tooltip ?? ''" [title]="item.tooltip ?? ''"
[disabled]="!!item.disabled" [disabled]="!!item.disabled"
[class.bg-accent]="$index === activeIndex() && !item.disabled" [class.bg-primary-surface]="$index === activeIndex() && !item.disabled"
[class.text-primary]="$index === activeIndex() && !item.disabled"
(mouseenter)="activeIndex.set($index)" (mouseenter)="activeIndex.set($index)"
(click)="pick(item)" (click)="pick(item)"
class="flex w-full items-center gap-2 px-3 py-1 text-left text-(length:--path-font) hover:bg-accent disabled:pointer-events-none disabled:opacity-50" class="flex w-full items-center gap-2 px-3 py-1 text-left text-(length:--path-font) disabled:pointer-events-none disabled:opacity-50"
> >
<span class="w-3.5 shrink-0"> <span class="w-3.5 shrink-0">
@if (item.checked) { @if (item.checked) {
+5
View File
@@ -27,6 +27,8 @@
--card-foreground: oklch(0.162 0.01 260); --card-foreground: oklch(0.162 0.01 260);
--primary: oklch(0.474 0.1481 173.7); /* green-500 */ --primary: oklch(0.474 0.1481 173.7); /* green-500 */
--primary-foreground: oklch(0.995 0.0001 260); --primary-foreground: oklch(0.995 0.0001 260);
/* Oxide's surface-accent: the fill of a selected/highlighted item (green-1200) */
--primary-surface: oklch(0.922 0.0586 163.7);
--muted: oklch(0.95 0.0001 260); /* n1100 */ --muted: oklch(0.95 0.0001 260); /* n1100 */
--muted-foreground: oklch(0.483 0.0041 260); /* n500 */ --muted-foreground: oklch(0.483 0.0041 260); /* n500 */
--accent: oklch(0.162 0.01 260 / 5%); --accent: oklch(0.162 0.01 260 / 5%);
@@ -69,6 +71,7 @@
--card-foreground: oklch(0.9 0.0001 260); --card-foreground: oklch(0.9 0.0001 260);
--primary: oklch(0.77 0.1919 163.7); /* green-800 */ --primary: oklch(0.77 0.1919 163.7); /* green-800 */
--primary-foreground: oklch(0.162 0.01 260); --primary-foreground: oklch(0.162 0.01 260);
--primary-surface: oklch(0.24 0.0722 183.7); /* green-200 */
--muted: oklch(0.316 0.006 260); /* n300 */ --muted: oklch(0.316 0.006 260); /* n300 */
--muted-foreground: oklch(0.717 0.0021 260); /* n700 */ --muted-foreground: oklch(0.717 0.0021 260); /* n700 */
--accent: oklch(1 0 0 / 7%); --accent: oklch(1 0 0 / 7%);
@@ -98,6 +101,7 @@
--card-foreground: oklch(0.9 0.0001 260); --card-foreground: oklch(0.9 0.0001 260);
--primary: oklch(0.77 0.1919 163.7); --primary: oklch(0.77 0.1919 163.7);
--primary-foreground: oklch(0.162 0.01 260); --primary-foreground: oklch(0.162 0.01 260);
--primary-surface: oklch(0.24 0.0722 183.7);
--muted: oklch(0.316 0.006 260); --muted: oklch(0.316 0.006 260);
--muted-foreground: oklch(0.717 0.0021 260); --muted-foreground: oklch(0.717 0.0021 260);
--accent: oklch(1 0 0 / 7%); --accent: oklch(1 0 0 / 7%);
@@ -158,6 +162,7 @@
--color-card-foreground: var(--card-foreground); --color-card-foreground: var(--card-foreground);
--color-primary: var(--primary); --color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground); --color-primary-foreground: var(--primary-foreground);
--color-primary-surface: var(--primary-surface);
--color-muted: var(--muted); --color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground); --color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent); --color-accent: var(--accent);