mirror of
https://github.com/vernu/textbee.git
synced 2026-08-02 10:28:21 -04:00
- CSS-first config: @import "tailwindcss" + @theme inline mapping the shadcn HSL tokens; colors unchanged (rebrand lands in the design part) - switch postcss to @tailwindcss/postcss, drop autoprefixer - replace tailwindcss-animate with tw-animate-css for the animate-in / data-state utilities the Radix primitives rely on - remove tailwind.config.js (v4 auto-detects content) and point components.json at the CSS - suppressHydrationWarning on <html> for the next-themes class swap Build, unit tests, and e2e all green; generated CSS verified to contain bg-primary, the brand ramp, border-border, and the accordion/animate utilities. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
157 lines
4.2 KiB
CSS
157 lines
4.2 KiB
CSS
@import 'tailwindcss';
|
|
@import 'tw-animate-css';
|
|
|
|
/* Tailwind v4 dark mode driven by a `.dark` class (set by next-themes). */
|
|
@custom-variant dark (&:is(.dark *));
|
|
|
|
/*
|
|
* Map the shadcn HSL design tokens (defined in :root / .dark below) to Tailwind
|
|
* v4 theme colors so utilities like bg-background, text-muted-foreground,
|
|
* border-border, bg-primary and the brand-* ramp keep working. Colors are
|
|
* intentionally unchanged from the Tailwind v3 setup here; the rebrand to the
|
|
* new primary orange happens in the design-system part.
|
|
*/
|
|
@theme inline {
|
|
--color-background: hsl(var(--background));
|
|
--color-foreground: hsl(var(--foreground));
|
|
|
|
--color-card: hsl(var(--card));
|
|
--color-card-foreground: hsl(var(--card-foreground));
|
|
|
|
--color-popover: hsl(var(--popover));
|
|
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
|
|
--color-primary: hsl(var(--primary));
|
|
--color-primary-foreground: hsl(var(--brand-foreground));
|
|
|
|
--color-secondary: hsl(var(--secondary));
|
|
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
|
|
--color-muted: hsl(var(--muted));
|
|
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
|
|
--color-accent: hsl(var(--accent));
|
|
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
|
|
--color-destructive: hsl(var(--destructive));
|
|
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
|
|
--color-border: hsl(var(--border));
|
|
--color-input: hsl(var(--input));
|
|
--color-ring: hsl(var(--ring));
|
|
|
|
--color-brand-foreground: hsl(var(--brand-foreground));
|
|
|
|
--color-chart-1: hsl(var(--chart-1));
|
|
--color-chart-2: hsl(var(--chart-2));
|
|
--color-chart-3: hsl(var(--chart-3));
|
|
--color-chart-4: hsl(var(--chart-4));
|
|
--color-chart-5: hsl(var(--chart-5));
|
|
|
|
--color-brand-50: #fffbeb;
|
|
--color-brand-100: #fef3c7;
|
|
--color-brand-200: #fde68a;
|
|
--color-brand-300: #fcd34d;
|
|
--color-brand-400: #fbbf24;
|
|
--color-brand-500: #d97706;
|
|
--color-brand-600: #b45309;
|
|
--color-brand-700: #92400e;
|
|
--color-brand-800: #78350f;
|
|
--color-brand-900: #451a03;
|
|
--color-brand-950: #2c0d02;
|
|
|
|
--radius-lg: var(--radius);
|
|
--radius-md: calc(var(--radius) - 2px);
|
|
--radius-sm: calc(var(--radius) - 4px);
|
|
|
|
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
}
|
|
|
|
@keyframes accordion-down {
|
|
from {
|
|
height: 0;
|
|
}
|
|
to {
|
|
height: var(--radix-accordion-content-height);
|
|
}
|
|
}
|
|
|
|
@keyframes accordion-up {
|
|
from {
|
|
height: var(--radix-accordion-content-height);
|
|
}
|
|
to {
|
|
height: 0;
|
|
}
|
|
}
|
|
|
|
:root {
|
|
--background: 0 0% 100%;
|
|
--foreground: 224 71.4% 4.1%;
|
|
--card: 0 0% 100%;
|
|
--card-foreground: 224 71.4% 4.1%;
|
|
--popover: 0 0% 100%;
|
|
--popover-foreground: 224 71.4% 4.1%;
|
|
--primary: 38 92% 44%;
|
|
--brand-foreground: 210 20% 98%;
|
|
--secondary: 220 14.3% 95.9%;
|
|
--secondary-foreground: 220.9 39.3% 11%;
|
|
--muted: 220 14.3% 95.9%;
|
|
--muted-foreground: 220 8.9% 46.1%;
|
|
--accent: 220 14.3% 95.9%;
|
|
--accent-foreground: 220.9 39.3% 11%;
|
|
--destructive: 0 84.2% 60.2%;
|
|
--destructive-foreground: 210 20% 98%;
|
|
--border: 220 13% 91%;
|
|
--input: 220 13% 91%;
|
|
--ring: 224 71.4% 4.1%;
|
|
--chart-1: 12 76% 61%;
|
|
--chart-2: 173 58% 39%;
|
|
--chart-3: 197 37% 24%;
|
|
--chart-4: 43 74% 66%;
|
|
--chart-5: 27 87% 67%;
|
|
--radius: 0.5rem;
|
|
}
|
|
|
|
.dark {
|
|
--background: 0 0% 15%;
|
|
--foreground: 0 0% 98%;
|
|
--card: 0 0% 15%;
|
|
--card-foreground: 0 0% 98%;
|
|
--popover: 0 0% 15%;
|
|
--popover-foreground: 0 0% 98%;
|
|
--primary: 38 92% 44%;
|
|
--brand-foreground: 0 0% 15%;
|
|
--secondary: 0 0% 25%;
|
|
--secondary-foreground: 0 0% 98%;
|
|
--muted: 0 0% 25%;
|
|
--muted-foreground: 0 0% 65%;
|
|
--accent: 0 0% 25%;
|
|
--accent-foreground: 0 0% 98%;
|
|
--destructive: 0 62.8% 30.6%;
|
|
--destructive-foreground: 210 20% 98%;
|
|
--border: 0 0% 25%;
|
|
--input: 0 0% 25%;
|
|
--ring: 0 0% 83%;
|
|
--chart-1: 220 70% 50%;
|
|
--chart-2: 160 60% 45%;
|
|
--chart-3: 30 80% 55%;
|
|
--chart-4: 280 65% 60%;
|
|
--chart-5: 340 75% 55%;
|
|
}
|
|
|
|
/*
|
|
* v4 no longer applies a default border color, and defaults many borders to
|
|
* currentColor. Keep the app's existing behavior of using the border token.
|
|
*/
|
|
@layer base {
|
|
* {
|
|
border-color: hsl(var(--border));
|
|
}
|
|
body {
|
|
background-color: hsl(var(--background));
|
|
color: hsl(var(--foreground));
|
|
}
|
|
}
|