ui / src / styles / globals.cssmain at d68d7e1
@import "tailwindcss";
@import "tw-animate-css";
/* shadcn's own Tailwind layer, which the vendored components are written against: the data-* variants
that match Base UI's attributes and skip a "false" value (cmdk renders data-selected="false"),
no-scrollbar, scroll-fade and shimmer. The `shadcn` devDependency pins it with the CLI.
https://ui.shadcn.com/docs/tailwind-v4 */
@import "shadcn/tailwind.css";
/* What our components use beyond shadcn's own variables. */
@import "./tokens.css";
@source "../**/*.{ts,tsx}";
/* On a phone every sheet fills the screen (iterate/iterate#1883), where upstream's are 3/4 wide. Each SheetContent
call site passes `data-[side=right]:w-full` (as wide as its max-width allows from `sm` up, too);
below `sm` (40rem) this rule also covers a sheet whose call site doesn't, and the phone's sidebar,
a sheet the vendored sidebar.tsx renders with no className to pass, by its slot. Keyed on the
sheet's own data-slot: Base UI puts data-side on every positioned popup. Unlayered, so it
outranks the utilities layer's `data-[side=…]:w-3/4`. */
@media (width < 40rem) {
[data-slot="sheet-content"]:is([data-side="left"], [data-side="right"]),
[data-slot="sidebar"][data-mobile="true"] {
width: 100%;
}
}
/* The agent chat's streamed-token reveal (agent-chat/streaming-text.tsx): `both` keeps a token invisible until its
animation-delay elapses, so a window's tokens fan in across the ~150ms between coalesced
chunk events. */
@keyframes token-in {
from {
opacity: 0;
}
}
/* A wide table scrolls sideways in its own box, and only sideways: the feed owns the vertical, so
the table shows all its rows (Streamdown caps it inline at 300px), and a swipe that reaches its
edge does not go on to the browser's back gesture. */
:has(> [data-streamdown="table"]) {
max-height: none !important;
overflow-y: hidden;
overscroll-behavior-x: contain;
border: 0;
}
/* A wrapped line of a list item hangs under its text, not under its bullet. */
[data-streamdown="unordered-list"],
[data-streamdown="ordered-list"] {
list-style-position: outside;
padding-inline-start: 1.25rem;
}
.animate-token-in {
animation: token-in 120ms both;
}
@media (prefers-reduced-motion: reduce) {
.animate-token-in {
animation: none;
}
}
/* A page that nobody looks at draws no frames for motion. While `data-unwatched` is on the root
(the Dash sets it while its window is not in focus or its tab is hidden), every animation stands
still where it is: a spinner of an agent at work would otherwise make the browser draw 60
frames a second for as long as the agent works. */
:root[data-unwatched] *,
:root[data-unwatched] *::before,
:root[data-unwatched] *::after {
animation-play-state: paused !important;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
}
/* Light, whatever the system says. Dark is shadcn's class `dark` on <html>, for a page that puts
it there: no app of ours does, and nothing here asks the system. A mind's own apps take theirs
from the shared theme file of its config repo (core/configs/default/apps/theme.css). `dark:`
follows the class too. color-scheme darkens the native controls and scrollbars, and picks a
side of each light-dark() in tokens.css. */
@custom-variant dark (&:is(.dark *));
:root {
color-scheme: light;
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
}
.dark {
color-scheme: dark;
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--sidebar: oklch(0.205 0 0);
--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.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}