9a896bb5f6
Nothing in the app respected prefers-reduced-motion — the kit's data-open/closed animations, the skeleton pulse, and the sidebar width transition all ran unconditionally. Add a global base-layer rule that collapses animation/transition durations to a single frame when the OS asks for reduced motion; one rule covers current and future additions. Add overscroll-y-contain to the scrollable modal/popup surfaces (DrawerContent, SelectContent, ComboboxPopup) so flicking past the end of their content no longer chain-scrolls the page beneath, and to AlertDialogContent for when it gains scrollable content. Verified in the built CSS: the media query and overscroll-behavior-y:contain both compile into dist/assets. Closes #71 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
122 lines
3.9 KiB
CSS
122 lines
3.9 KiB
CSS
@import "tailwindcss";
|
|
@import "tw-animate-css";
|
|
@import "@fontsource-variable/geist";
|
|
|
|
@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-success: var(--success);
|
|
--color-success-foreground: var(--success-foreground);
|
|
--color-warning: var(--warning);
|
|
--color-warning-foreground: var(--warning-foreground);
|
|
--color-highlight: var(--highlight);
|
|
--color-highlight-foreground: var(--highlight-foreground);
|
|
--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);
|
|
--font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
|
|
}
|
|
|
|
:root {
|
|
color-scheme: light;
|
|
--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.511 0.262 276.966);
|
|
--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);
|
|
--success: oklch(0.627 0.194 149.214);
|
|
--success-foreground: oklch(0.985 0 0);
|
|
--warning: oklch(0.666 0.179 58.318);
|
|
--warning-foreground: oklch(0.985 0 0);
|
|
--highlight: oklch(0.905 0.182 98.111);
|
|
--highlight-foreground: oklch(0.205 0 0);
|
|
--border: oklch(0.922 0 0);
|
|
--input: oklch(0.922 0 0);
|
|
--ring: oklch(0.511 0.262 276.966);
|
|
--radius: 0.625rem;
|
|
}
|
|
|
|
.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.72 0.18 277);
|
|
--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);
|
|
--success: oklch(0.723 0.192 149.579);
|
|
--success-foreground: oklch(0.205 0 0);
|
|
--warning: oklch(0.769 0.188 70.08);
|
|
--warning-foreground: oklch(0.205 0 0);
|
|
--highlight: oklch(0.852 0.199 91.936);
|
|
--highlight-foreground: oklch(0.205 0 0);
|
|
--border: oklch(1 0 0 / 10%);
|
|
--input: oklch(1 0 0 / 15%);
|
|
--ring: oklch(0.72 0.18 277);
|
|
}
|
|
|
|
@layer base {
|
|
* {
|
|
@apply border-border outline-ring/50;
|
|
}
|
|
|
|
body {
|
|
@apply bg-background text-foreground font-sans;
|
|
}
|
|
|
|
/* Collapse all animation/transition to a single frame for users who ask the
|
|
OS for reduced motion. Covers the kit's data-open/closed animations, the
|
|
skeleton pulse, and the sidebar width transition in one place. */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*,
|
|
::before,
|
|
::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
@layer components {
|
|
.label-caption {
|
|
@apply text-xs font-medium uppercase tracking-wide text-muted-foreground;
|
|
}
|
|
}
|