Files
buzz/desktop/src/shared/styles/globals/theme.css
2026-07-12 16:35:35 +01:00

577 lines
20 KiB
CSS

@layer base {
:root {
/* Catppuccin Latte (mauve accent) */
--radius: 0.625rem;
--background: 220 23.08% 94.9%;
--foreground: 234 16.02% 35.49%;
--card: 220 23.08% 94.9%;
--card-foreground: 234 16.02% 35.49%;
--popover: 220 23.08% 94.9%;
--popover-foreground: 234 16.02% 35.49%;
--primary: 266 85.05% 58.04%;
--primary-foreground: 220 23.08% 94.9%;
--secondary: 223 15.91% 82.75%;
--secondary-foreground: 234 16.02% 35.49%;
--muted: 223 15.91% 82.75%;
--muted-foreground: 233 12.8% 41.37%;
--huddle-drawer-surface: 0 0% 0%;
--huddle-control-surface: 0 0% 20%;
--huddle-control-hover-surface: 0 0% 24%;
--huddle-control-chevron-surface: 0 0% 16%;
--huddle-control-chevron-hover-surface: 0 0% 22%;
--huddle-control-foreground: 0 0% 98%;
--huddle-popover-surface: 0 0% 16%;
--huddle-popover-border: 0 0% 24%;
--huddle-tooltip-surface: 0 0% 20%;
--huddle-tooltip-foreground: 0 0% 98%;
--accent: 223 15.91% 82.75%;
--accent-foreground: 234 16.02% 35.49%;
--destructive: 347 86.67% 44.12%;
--destructive-foreground: 220 23.08% 94.9%;
--border: 225 13.56% 76.86%;
--input: 225 13.56% 76.86%;
--ring: 234 16.02% 35.49%;
--chart-1: 345 57.65% 74.12%;
--chart-2: 185 37.25% 70.59%;
--chart-3: 219 81.96% 78.43%;
--chart-4: 35 61.18% 76.86%;
--chart-5: 113 32.94% 73.33%;
--sidebar: 218 25.1% 93.73%;
--sidebar-background: 218 25.1% 93.73%;
--sidebar-foreground: 234 16.02% 35.49%;
--sidebar-primary: 266 85.05% 58.04%;
--sidebar-primary-foreground: 220 23.08% 94.9%;
--sidebar-active: var(--sidebar-primary);
--sidebar-active-foreground: var(--sidebar-primary-foreground);
--sidebar-accent: 220 23.08% 94.9%;
--sidebar-accent-foreground: 234 16.02% 35.49%;
--sidebar-border: 225 13.56% 76.86%;
--sidebar-ring: 225 13.56% 76.86%;
}
.dark {
/* Catppuccin Macchiato (mauve accent) */
--radius: 0.625rem;
--background: 232 23.4% 18.43%;
--foreground: 227 68.25% 87.65%;
--card: 232 23.4% 18.43%;
--card-foreground: 227 68.25% 87.65%;
--popover: 232 23.4% 18.43%;
--popover-foreground: 227 68.25% 87.65%;
--primary: 267 82.69% 79.61%;
--primary-foreground: 232 23.4% 18.43%;
--secondary: 230 18.8% 26.08%;
--secondary-foreground: 227 68.25% 87.65%;
--muted: 230 18.8% 26.08%;
--muted-foreground: 228 39.22% 80%;
--huddle-drawer-surface: 230 18.8% 26.08%;
--huddle-control-surface: 231 15.61% 33.92%;
--huddle-control-hover-surface: 231 15.61% 38%;
--huddle-control-chevron-surface: 231 13.16% 29.8%;
--huddle-control-chevron-hover-surface: 231 15.61% 33.92%;
--huddle-control-foreground: 227 68.25% 87.65%;
--huddle-popover-surface: 231 13.16% 29.8%;
--huddle-popover-border: 231 15.61% 38%;
--huddle-tooltip-surface: 231 15.61% 33.92%;
--huddle-tooltip-foreground: 227 68.25% 87.65%;
--accent: 230 18.8% 26.08%;
--accent-foreground: 227 68.25% 87.65%;
--destructive: 351 73.91% 72.94%;
--destructive-foreground: 232 23.4% 18.43%;
--border: 231 15.61% 33.92%;
--input: 231 15.61% 33.92%;
--ring: 227 68.25% 87.65%;
--chart-1: 333 20.78% 38.04%;
--chart-2: 193 19.61% 38.04%;
--chart-3: 224 26.67% 41.18%;
--chart-4: 30 8.24% 42.35%;
--chart-5: 139 10.98% 38.82%;
--sidebar: 234 22.75% 17.25%;
--sidebar-background: 234 22.75% 17.25%;
--sidebar-foreground: 227 68.25% 87.65%;
--sidebar-primary: 267 82.69% 79.61%;
--sidebar-primary-foreground: 232 23.4% 18.43%;
--sidebar-active: var(--sidebar-primary);
--sidebar-active-foreground: var(--sidebar-primary-foreground);
--sidebar-accent: 232 23.4% 18.43%;
--sidebar-accent-foreground: 227 68.25% 87.65%;
--sidebar-border: 231 15.61% 33.92%;
--sidebar-ring: 231 15.61% 33.92%;
}
* {
@apply border-border;
}
html,
body,
#root {
height: 100%;
min-height: 100%;
width: 100%;
}
/*
* The app is a fixed-height shell — the document itself must never scroll
* or rubber-band. `overscroll-behavior: none` stops scroll chaining from
* inner containers reaching the viewport on both axes (the Magic Mouse
* horizontal pan escaped through here), and `overflow: hidden` removes any
* document-level scrollability. useWebviewScrollBoundaryLock handles the
* wheel-event side; this is the CSS backstop.
*/
html,
body {
overflow: hidden;
overscroll-behavior: none;
}
mark {
background-color: transparent;
color: inherit;
}
html.dark {
color-scheme: dark;
}
body {
@apply bg-background text-foreground antialiased;
font-family: "Inter Variable", Inter, "Avenir Next", "Segoe UI", sans-serif;
}
/*
* Tailwind v4's preflight no longer sets `cursor: pointer` on buttons.
* Restore it for clearly actionable elements so hover affordance is
* consistent across the app. Disabled / aria-disabled elements keep
* the default cursor; explicit `cursor-*` utility classes still win
* because utilities are in a later layer than base.
*/
button:not(:disabled),
a[href],
summary,
[role="button"]:not([aria-disabled="true"]),
[role="menuitem"]:not([aria-disabled="true"]),
[role="menuitemcheckbox"]:not([aria-disabled="true"]),
[role="menuitemradio"]:not([aria-disabled="true"]),
[role="tab"]:not([aria-disabled="true"]),
[role="link"] {
cursor: pointer;
}
button:disabled,
[aria-disabled="true"] {
cursor: default;
}
}
/*
* Buzz theme - sidebar gradient.
*
* Buzz reuses the GitHub Light palette for every base color; its one
* distinguishing feature is this gradient painted across the sidebar/nav
* canvas, replacing GitHub Light's flat grey. ThemeProvider toggles the
* `data-buzz-sidebar` attribute on <html> when the Buzz theme is active.
*
* These rules are intentionally UNLAYERED: the `bg-sidebar` background-color
* lives in Tailwind's `utilities` layer, and unlayered declarations win over
* any layered ones, so this reliably overrides it without an `!important`.
*
* The gradient is applied to the shell wrapper plus every `bg-sidebar` canvas
* surface inside it (top chrome, sidebar column, and the inset margin behind
* the white content card). A few panes that do not literally carry
* `bg-sidebar` are marked explicitly (`data-buzz-glass-inset` /
* `data-buzz-glass-footer-wrap`) so they join the same visual layer. Two
* chrome surfaces rendered outside the wrapper also get precise selectors: the
* portaled mobile sidebar (`[data-sidebar="sidebar"][data-mobile="true"]`) and
* the workspace rail (`[data-testid="workspace-rail"]`).
* Scoping this way keeps the branding on the app chrome and off unrelated
* `bg-sidebar` consumers rendered in portals outside the shell (e.g. the
* persona catalog dialog). `background-attachment: fixed` anchors the gradient
* to the viewport so these separate surfaces read as one continuous gradient
* rather than each restarting the ramp. `background-color` is cleared so the
* grey `--sidebar-background` never shows through.
*
* Small transient `bg-sidebar` chips inside the shell that are NOT canvas
* surfaces (the drag-overlay pills) opt out via `[data-buzz-flat]` - a
* viewport-fixed gradient behind a small floating chip would show an arbitrary
* slice of the ramp.
*
* Item hover/active states use `bg-sidebar-accent` / `bg-sidebar-active`
* (distinct tokens) and are intentionally left untouched.
*/
:root[data-buzz-sidebar] {
--buzz-gradient-top: #e6e6b6;
--buzz-gradient-bottom: #c4d0da;
--buzz-channel-fg: inherit;
--buzz-dm-fg: inherit;
--buzz-nav-fg: inherit;
--buzz-hover-fill: #ffffff;
--buzz-hover-alpha: 48%;
--buzz-hover-surface: color-mix(
in srgb,
var(--buzz-hover-fill) var(--buzz-hover-alpha),
transparent
);
--buzz-active-fill: 0 0% 100%;
--buzz-active-foreground: var(--foreground);
}
/*
* Dark variant (Buzz Dark). Reuses the GitHub Dark base palette; only the
* three Buzz tokens change, so every downstream rule (gradient fill, hover,
* search box, active pill) adapts automatically. The `.dark` class is set on
* the document root whenever a dark theme is active.
*/
:root[data-buzz-sidebar].dark {
--buzz-gradient-top: #2b2b18;
--buzz-gradient-bottom: #1b2530;
--buzz-hover-alpha: 9.6%;
--buzz-active-fill: 0 0% 100%;
--buzz-active-foreground: 0 0% 100%;
}
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="sidebar-pinned-header"] {
padding-top: 0.75rem;
}
:root[data-buzz-sidebar] .group\/sidebar-wrapper,
:root[data-buzz-sidebar] [data-testid="app-sidebar"],
:root[data-buzz-sidebar] [data-buzz-glass-inset],
:root[data-buzz-sidebar] [data-buzz-glass-footer-wrap],
:root[data-buzz-sidebar]
.group\/sidebar-wrapper
.bg-sidebar:not([data-buzz-flat]),
:root[data-buzz-sidebar]
[data-sidebar="sidebar"][data-mobile="true"].bg-sidebar,
:root[data-buzz-sidebar] [data-testid="workspace-rail"].bg-sidebar {
background-color: transparent;
background-image: linear-gradient(
to bottom,
var(--buzz-gradient-top),
var(--buzz-gradient-bottom)
);
background-attachment: fixed;
background-size: 100vw 100vh;
background-repeat: no-repeat;
}
/*
* The pinned header (search + nav) and the footer (profile card) are painted
* with an opaque `--sidebar-background` fill plus a soft edge-fade pseudo-
* element (see `components.css`). Under GitHub Light that fill is the flat
* grey we are replacing, so it reads as an opaque panel floating over the
* gradient. Repaint both regions with the SAME viewport-fixed gradient so
* they line up seamlessly with the surrounding sidebar canvas, and drop the
* edge-fade (there is no longer a distinct surface to fade into).
*/
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="sidebar-pinned-header"],
:root[data-buzz-sidebar] [data-testid="app-sidebar"] [data-sidebar="footer"] {
background-color: transparent;
background-image: linear-gradient(
to bottom,
var(--buzz-gradient-top),
var(--buzz-gradient-bottom)
);
background-attachment: fixed;
background-size: 100vw 100vh;
background-repeat: no-repeat;
}
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="sidebar-pinned-header"]::before,
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-sidebar="footer"]::before {
background: none;
}
/*
* Active nav item. The accent system (`applyAccentColor` in ThemeProvider)
* sets `--sidebar-active` to the theme foreground as an INLINE style on
* :root, which renders the selected page as a solid black pill under GitHub
* Light. For the Buzz theme we want a white pill instead. Override the two
* active tokens on the sidebar element itself; element-local custom properties
* win over the inherited inline values from :root. Text flips to the theme
* foreground so it stays legible on the white pill; the derived
* `bg-sidebar-active-foreground/20` badge on active items follows
* automatically.
*
* SCOPED to the app sidebar container, NOT :root - the `bg-sidebar-active` /
* `text-sidebar-active-foreground` tokens are also consumed by non-sidebar
* controls (avatar edit buttons in ProfileSettingsCard / AgentCreationPreview,
* the selected persona row in PersonaCatalogDialog). A root-level override
* turned those white (white-on-white under Buzz Dark); scoping keeps them on
* the normal accent-driven active colors.
*/
:root[data-buzz-sidebar] [data-testid="app-sidebar"],
:root[data-buzz-sidebar] [data-testid="settings-sidebar"] {
--sidebar-active: var(--buzz-active-fill);
--sidebar-active-foreground: var(--buzz-active-foreground);
}
/*
* Dark variant: keep the active-pill foreground white on the dark gradient.
* (The pill itself is repainted to a translucent tint by the rule below.)
*/
:root[data-buzz-sidebar].dark [data-testid="app-sidebar"],
:root[data-buzz-sidebar].dark [data-testid="settings-sidebar"] {
--sidebar-active: var(--buzz-active-fill);
--sidebar-active-foreground: var(--buzz-active-foreground);
}
/*
* Active nav pill: drop the drop shadow so the white tab sits flat on the
* gradient (Buzz-only; other themes keep `shadow-xs`). Higher specificity
* than the `data-[active=true]:shadow-xs` utility and unlayered, so it wins.
*/
:root[data-buzz-sidebar] [data-testid="app-sidebar"] [data-active="true"],
:root[data-buzz-sidebar] [data-testid="settings-sidebar"] [data-active="true"] {
box-shadow: none;
}
/*
* On dark the active pill is a translucent white tint rather than a solid
* fill, so it sits on the gradient without blowing out.
*/
:root[data-buzz-sidebar].dark [data-testid="app-sidebar"] [data-active="true"],
:root[data-buzz-sidebar].dark
[data-testid="settings-sidebar"]
[data-active="true"] {
background-color: color-mix(
in srgb,
hsl(var(--buzz-active-fill)) 16%,
transparent
);
}
/*
* Hover on non-active nav items uses a translucent white fill (see
* `--buzz-hover-surface`) instead of the grey `--sidebar-accent`. Active
* items are excluded - they stay solid on hover (their
* `data-[active=true]:hover:bg-sidebar-active` rule). Covers both top-level
* menu buttons and channel sub-buttons, in the app nav and the settings nav.
*/
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-sidebar="menu-button"]:not([data-active="true"]):hover,
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-sidebar="menu-sub-button"]:not([data-active="true"]):hover,
:root[data-buzz-sidebar]
[data-testid="settings-sidebar"]
[data-sidebar="menu-button"]:not([data-active="true"]):hover,
:root[data-buzz-sidebar]
[data-testid="settings-sidebar"]
[data-sidebar="menu-sub-button"]:not([data-active="true"]):hover {
background-color: var(--buzz-hover-surface);
}
/*
* Search box: match the same translucent white fill (see
* `--buzz-hover-surface`) instead of the grey `bg-sidebar-border/35` fill, at
* rest and on hover/focus.
*/
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="open-search"],
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="open-search"]:hover,
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="open-search"]:focus-visible {
background-color: var(--buzz-hover-surface);
}
/*
* Section action buttons (the "+" and "..." at the right edge of each sidebar
* section header): match the same translucent white fill (see
* `--buzz-hover-surface`) on hover/focus instead of the grey
* `bg-sidebar-border/35` fill. Unlayered + `[data-buzz-sidebar]` prefix beats
* the Tailwind utility so it only applies under the Buzz theme.
*/
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
.sidebar-section-action:hover,
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
.sidebar-section-action:focus-visible {
background-color: var(--buzz-hover-surface);
}
/*
* Per-row-type text colors (Buzz theme).
*
* By default the whole sidebar inherits a single `--sidebar-foreground`, so
* channels, direct messages, and the Inbox/Agents nav rows all share one text
* color. These variables let each row type carry its own foreground while
* keeping the default value unchanged.
*
* Each var defaults to `inherit`, so with nothing set the sidebar looks
* exactly as before. Scoped to the Buzz sidebar container so other themes are
* untouched.
*/
/* Channels: rows live inside the `stream-list` / `starred-list` menus. */
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="stream-list"]
[data-sidebar="menu-button"]:not([data-active="true"]),
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="stream-list"]
[data-sidebar="menu-sub-button"]:not([data-active="true"]),
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="starred-list"]
[data-sidebar="menu-button"]:not([data-active="true"]),
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="starred-list"]
[data-sidebar="menu-sub-button"]:not([data-active="true"]) {
color: var(--buzz-channel-fg);
}
/* Direct messages: rows live inside the `dm-list` menu. */
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="dm-list"]
[data-sidebar="menu-button"]:not([data-active="true"]),
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="dm-list"]
[data-sidebar="menu-sub-button"]:not([data-active="true"]) {
color: var(--buzz-dm-fg);
}
/*
* Inbox + Agents nav rows: the pinned-header nav buttons (Inbox, Pulse,
* Projects, Agents, Workflows). Excludes the active row so the active-pill
* foreground still wins.
*/
:root[data-buzz-sidebar]
[data-testid="app-sidebar"]
[data-testid="sidebar-pinned-header"]
[data-sidebar="menu-button"]:not([data-active="true"]) {
color: var(--buzz-nav-fg);
}
/*
* Translucency (Buzz theme).
*
* ThemeProvider toggles `data-buzz-translucent` for Buzz themes. Keep the
* frosted layer on the outer canvases only; nested sidebar/header/footer
* surfaces pass through so the nav reads as one continuous pane.
*/
:root[data-buzz-translucent] {
/* Neutral frosted wash; alpha applied via color-mix below. */
--buzz-glass-tint: #ffffff;
--buzz-glass-intensity: 1;
--buzz-translucency-gradient-alpha: 70%;
--buzz-translucency-wash-alpha: 2.4%;
}
:root[data-buzz-translucent].dark {
--buzz-glass-tint: #12161d;
}
:root[data-buzz-translucent] .group\/sidebar-wrapper,
:root[data-buzz-translucent]
[data-sidebar="sidebar"][data-mobile="true"].bg-sidebar,
:root[data-buzz-translucent] [data-testid="workspace-rail"].bg-sidebar {
background-color: transparent;
/* Buzz color wash above a neutral frost wash. */
background-image:
linear-gradient(
to bottom,
color-mix(
in srgb,
var(--buzz-gradient-top) var(--buzz-translucency-gradient-alpha, 70%),
transparent
),
color-mix(
in srgb,
var(--buzz-gradient-bottom) var(--buzz-translucency-gradient-alpha, 70%),
transparent
)
),
linear-gradient(
to bottom,
color-mix(
in srgb,
var(--buzz-glass-tint) var(--buzz-translucency-wash-alpha, 2.4%),
transparent
),
color-mix(
in srgb,
var(--buzz-glass-tint) var(--buzz-translucency-wash-alpha, 2.4%),
transparent
)
);
background-attachment: fixed, fixed;
background-size:
100vw 100vh,
100vw 100vh;
background-repeat: no-repeat, no-repeat;
}
:root[data-buzz-translucent] [data-testid="app-sidebar"],
:root[data-buzz-translucent] [data-buzz-glass-inset],
:root[data-buzz-translucent] [data-buzz-glass-footer-wrap],
:root[data-buzz-translucent]
.group\/sidebar-wrapper
.bg-sidebar:not([data-buzz-flat]),
:root[data-buzz-translucent]
[data-testid="app-sidebar"]
[data-testid="sidebar-pinned-header"],
:root[data-buzz-translucent]
[data-testid="app-sidebar"]
[data-sidebar="footer"] {
background-color: transparent;
background-image: none;
}
/* Remove edge fades and stacking contexts that made header/footer look separate. */
:root[data-buzz-translucent]
[data-testid="app-sidebar"]
[data-testid="sidebar-pinned-header"],
:root[data-buzz-translucent] [data-buzz-glass-inset],
:root[data-buzz-translucent]
[data-testid="app-sidebar"]
[data-buzz-glass-footer-wrap],
:root[data-buzz-translucent]
[data-testid="app-sidebar"]
[data-sidebar="footer"] {
isolation: auto;
z-index: auto;
}
:root[data-buzz-translucent]
[data-testid="app-sidebar"]
[data-testid="sidebar-pinned-header"]::before,
:root[data-buzz-translucent]
[data-testid="app-sidebar"]
[data-sidebar="footer"]::before {
background: none;
}
/* Let the native transparent window show through behind the sidebar glass. */
:root[data-buzz-translucent],
:root[data-buzz-translucent] body {
background-color: transparent;
background-image: none;
}
/* Shell wrappers stay clear; the main content card remains opaque. */
:root[data-buzz-translucent] .buzz-huddle-shell,
:root[data-buzz-translucent] .buzz-huddle-app-surface {
background: transparent;
}
:root[data-buzz-translucent] .buzz-huddle-app-surface::after {
background: transparent;
}