Files
multica/packages/ui/styles/tokens.css
Jiayuan Zhang ca46fdb483 fix(ui): lighten menu shadows with dedicated --menu-shadow token (#5256)
Dropdown, context menu, select, and popover surfaces used
--floating-shadow, which is sized for window-level overlays and reads
too heavy on trigger-anchored menus. Introduce a lighter --menu-shadow
tier (surface < menu < floating) and drop the shadow-lg override on
ContextMenuSubContent so submenus match their parent menu. Dialogs and
sheets keep --floating-shadow.

Co-authored-by: Lambda <lambda@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
2026-07-11 14:33:04 +08:00

196 lines
8.7 KiB
CSS

/* Multica design tokens — shared across Web + Desktop */
@theme inline {
--font-heading: var(--font-sans);
--font-sans: var(--font-sans);
--font-serif: var(--font-serif);
--font-mono: var(--font-mono);
--color-app-shell: var(--app-shell);
--color-page-canvas: var(--page-canvas);
--color-surface: var(--surface);
--color-surface-foreground: var(--surface-foreground);
--color-surface-raised: var(--surface-raised);
--color-surface-hover: var(--surface-hover);
--color-surface-selected: var(--surface-selected);
--color-surface-selected-foreground: var(--surface-selected-foreground);
--color-surface-border: var(--surface-border);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-success: var(--success);
--color-warning: var(--warning);
--color-info: var(--info);
--color-brand: var(--brand);
--color-brand-foreground: var(--brand-foreground);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--color-foreground: var(--foreground);
--color-background: var(--background);
--radius-sm: calc(var(--radius) * 0.6);
--radius-md: calc(var(--radius) * 0.8);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) * 1.4);
--radius-2xl: calc(var(--radius) * 1.8);
--radius-3xl: calc(var(--radius) * 2.2);
--radius-4xl: calc(var(--radius) * 2.6);
}
:root {
color-scheme: light;
/* Surface system: the app shell is the quiet outer frame; the page canvas
is where lists, boards, and conversations live; surfaces are reserved
for bounded content groups; raised surfaces are ephemeral overlays. */
--app-shell: oklch(0.964435 0.001327 286.375);
--page-canvas: oklch(0.988087 0 0);
--surface: oklch(1 0 0);
--surface-foreground: oklch(0.141 0.005 285.823);
--surface-raised: oklch(1 0 0);
--surface-hover: oklch(0.967 0.001 286.375);
--surface-selected: oklch(0.95 0.002 286.375);
--surface-selected-foreground: oklch(0.141 0.005 285.823);
--surface-border: oklch(0.92 0.004 286.32);
--surface-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 1px 1px rgb(15 23 42 / 0.03);
--floating-shadow: 0 16px 40px rgb(15 23 42 / 0.14), 0 3px 10px rgb(15 23 42 / 0.08);
/* Menus (dropdown/context/select/popover) hover just above their trigger,
so they carry a lighter shadow than window-level overlays (dialogs,
sheets), which keep --floating-shadow. */
--menu-shadow: 0 8px 24px rgb(15 23 42 / 0.08), 0 2px 6px rgb(15 23 42 / 0.05);
--background: var(--page-canvas);
--foreground: oklch(0.141 0.005 285.823);
--card: var(--surface);
--card-foreground: oklch(0.141 0.005 285.823);
--popover: var(--surface-raised);
--popover-foreground: oklch(0.141 0.005 285.823);
--primary: oklch(0.21 0.006 285.885);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.967 0.001 286.375);
--secondary-foreground: oklch(0.21 0.006 285.885);
--muted: oklch(0.967 0.001 286.375);
--muted-foreground: oklch(0.552 0.016 285.938);
--accent: oklch(0.967 0.001 286.375);
--accent-foreground: oklch(0.21 0.006 285.885);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.945 0.003 286.32);
--input: oklch(0.92 0.004 286.32);
--ring: oklch(0.705 0.015 286.067);
/* Brand-derived blue gradient (h=255 = brand hue). chart-1 equals brand
so the most important series visually anchors to the product colour;
chart-2..5 step lighter + less saturated so a stacked bar reads
"primary → secondary → tertiary" at a glance instead of fighting
for attention as five equally-weighted greys. */
--chart-1: oklch(0.55 0.16 255);
--chart-2: oklch(0.66 0.13 255);
--chart-3: oklch(0.76 0.10 255);
--chart-4: oklch(0.85 0.06 255);
--chart-5: oklch(0.92 0.03 255);
--radius: 0.625rem;
--sidebar: oklch(0.964435 0.001327 286.375);
--sidebar-foreground: oklch(0.141 0.005 285.823);
--sidebar-primary: oklch(0.21 0.006 285.885);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.935 0.003 286.375);
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
--sidebar-border: oklch(0.92 0.004 286.32);
--sidebar-ring: oklch(0.705 0.015 286.067);
--brand: oklch(0.55 0.16 255);
--brand-foreground: oklch(0.985 0 0);
--success: oklch(0.55 0.16 145);
--warning: oklch(0.75 0.16 85);
--info: oklch(0.55 0.18 250);
--scrollbar-thumb: oklch(0 0 0 / 10%);
--scrollbar-thumb-hover: oklch(0 0 0 / 18%);
--scrollbar-track: transparent;
/* In-page find (Cmd/Ctrl+F) match tints, painted via the CSS Custom
Highlight API. Bright fill + dark text so matches stay legible in
both themes; the active match steps to orange. */
--find-match: oklch(0.92 0.15 100);
--find-match-active: oklch(0.82 0.17 62);
--find-match-foreground: oklch(0.22 0.03 92);
}
.dark {
color-scheme: dark;
--app-shell: oklch(0.155 0.005 285.823);
--page-canvas: oklch(0.18 0.005 285.823);
--surface: oklch(0.21 0.006 285.885);
--surface-foreground: oklch(0.985 0 0);
--surface-raised: oklch(0.235 0.007 285.885);
--surface-hover: oklch(0.274 0.006 286.033);
--surface-selected: oklch(0.3 0.006 286.033);
--surface-selected-foreground: oklch(0.985 0 0);
--surface-border: oklch(1 0 0 / 10%);
--surface-shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 1px 1px rgb(0 0 0 / 0.16);
--floating-shadow: 0 20px 48px rgb(0 0 0 / 0.46), 0 4px 12px rgb(0 0 0 / 0.28);
--menu-shadow: 0 10px 28px rgb(0 0 0 / 0.3), 0 2px 8px rgb(0 0 0 / 0.18);
--background: var(--page-canvas);
--foreground: oklch(0.985 0 0);
--card: var(--surface);
--card-foreground: oklch(0.985 0 0);
--popover: var(--surface-raised);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.92 0.004 286.32);
--primary-foreground: oklch(0.21 0.006 285.885);
--secondary: oklch(0.274 0.006 286.033);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.274 0.006 286.033);
--muted-foreground: oklch(0.705 0.015 286.067);
--accent: oklch(0.274 0.006 286.033);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 6%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.552 0.016 285.938);
/* Dark mode mirrors light mode's "primary → secondary" gradient on the
brand hue, but flips the lightness curve: the most important series
is the brightest (so it pops on the dark background) and trailing
series get progressively darker / less saturated. */
--chart-1: oklch(0.72 0.16 255);
--chart-2: oklch(0.62 0.13 255);
--chart-3: oklch(0.52 0.10 255);
--chart-4: oklch(0.42 0.06 255);
--chart-5: oklch(0.32 0.03 255);
--sidebar: oklch(0.21 0.006 285.885);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.274 0.006 286.033);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.552 0.016 285.938);
--brand: oklch(0.65 0.16 255);
--brand-foreground: oklch(0.985 0 0);
--success: oklch(0.65 0.15 145);
--warning: oklch(0.70 0.16 85);
--info: oklch(0.65 0.18 250);
--scrollbar-thumb: oklch(1 0 0 / 8%);
--scrollbar-thumb-hover: oklch(1 0 0 / 18%);
--scrollbar-track: transparent;
--find-match: oklch(0.82 0.16 100);
--find-match-active: oklch(0.76 0.18 60);
--find-match-foreground: oklch(0.18 0.02 92);
}