将前端 TailwindCSS 版本从v3 升级到 v4

This commit is contained in:
DrSmoothl
2026-03-14 18:11:37 +08:00
parent 037bc493a0
commit 51f2455ee1
8 changed files with 118 additions and 126 deletions

View File

@@ -1,6 +1,104 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@source "./**/*.{js,ts,jsx,tsx}";
@custom-variant dark (&:where(.dark, .dark *));
@theme inline {
--color-border: hsl(var(--border));
--color-input: hsl(var(--input));
--color-ring: hsl(var(--ring));
--color-background: hsl(var(--background));
--color-foreground: hsl(var(--foreground));
--color-primary: hsl(var(--primary));
--color-primary-foreground: hsl(var(--primary-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-card: hsl(var(--card));
--color-card-foreground: hsl(var(--card-foreground));
--color-popover: hsl(var(--popover));
--color-popover-foreground: hsl(var(--popover-foreground));
--color-destructive: hsl(var(--destructive));
--color-destructive-foreground: hsl(var(--destructive-foreground));
--radius-sm: var(--visual-radius-sm);
--radius-md: var(--visual-radius-md);
--radius-lg: var(--visual-radius-lg);
--radius-xl: var(--visual-radius-xl);
--font-sans: var(--typography-font-family-base);
--font-mono: var(--typography-font-family-code);
--shadow-sm: var(--visual-shadow-sm);
--shadow-md: var(--visual-shadow-md);
--shadow-lg: var(--visual-shadow-lg);
--shadow-xl: var(--visual-shadow-xl);
--animate-slide-in-from-right: slide-in-from-right 0.3s ease-out;
--animate-slide-out-to-right: slide-out-to-right 0.2s ease-in;
--animate-slide-in-from-top: slide-in-from-top 0.3s ease-out;
--animate-slide-out-to-top: slide-out-to-top 0.2s ease-in;
--animate-fade-in: fade-in 0.2s ease-out;
--animate-fade-out: fade-out 0.15s ease-in;
}
@keyframes slide-in-from-right {
from {
transform: translateX(100%);
}
to {
transform: translateX(0);
}
}
@keyframes slide-out-to-right {
from {
transform: translateX(0);
}
to {
transform: translateX(100%);
}
}
@keyframes slide-in-from-top {
from {
transform: translateY(-100%);
}
to {
transform: translateY(0);
}
}
@keyframes slide-out-to-top {
from {
transform: translateY(0);
}
to {
transform: translateY(-100%);
}
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fade-out {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
/* JetBrains Mono 字体 - 用于代码编辑器 */
@font-face {