Skip to content

Commit ec520dc

Browse files
committed
refactor: update PostCSS configuration and remove Tailwind config file
- Modified postcss.config.mjs to use the new plugin format for Tailwind CSS. - Removed the tailwind.config.ts file as it is no longer needed.
1 parent 153778f commit ec520dc

7 files changed

Lines changed: 370 additions & 149 deletions

File tree

app/globals.css

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";
2+
3+
@theme {
4+
--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
5+
}
46

57
:root {
68
color-scheme: dark;
@@ -22,7 +24,7 @@ html {
2224
}
2325

2426
body {
25-
font-family: theme('fontFamily.sans');
27+
font-family: var(--font-sans);
2628
background: #0f172a;
2729
color: #f1f5f9;
2830
}
@@ -63,11 +65,6 @@ body,
6365
background: var(--scrollbar-thumb-hover);
6466
}
6567

66-
a {
67-
color: inherit;
68-
text-decoration: none;
69-
}
70-
7168
/* 模态框动画 */
7269
@keyframes modalFadeIn {
7370
from {

app/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function LoginPageContent() {
138138

139139
{isLocked && (
140140
<div className="bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 flex items-start gap-3">
141-
<Shield className="h-5 w-5 mt-0.5 flex-shrink-0 animate-pulse" />
141+
<Shield className="h-5 w-5 mt-0.5 shrink-0 animate-pulse" />
142142
<div className="flex-1">
143143
<p className="font-semibold mb-1">账户已锁定</p>
144144
<p className="text-sm flex items-center gap-1.5">

app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ export default function DashboardPage() {
577577
<main className={`min-h-screen px-6 py-8 transition-colors ${darkMode ? "bg-slate-900 text-slate-100" : "bg-slate-50 text-slate-900"}`}>
578578
{overviewError ? (
579579
<div className="mb-6 flex items-start gap-3 rounded-xl border border-red-500/50 bg-red-500/10 px-4 py-3 text-sm text-red-400">
580-
<AlertTriangle className="mt-0.5 h-5 w-5 flex-shrink-0" />
580+
<AlertTriangle className="mt-0.5 h-5 w-5 shrink-0" />
581581
<div>
582582
<p className="font-semibold">加载失败</p>
583583
<p className="text-red-300">{overviewError}</p>
@@ -957,7 +957,7 @@ export default function DashboardPage() {
957957
{/* 饼图 */}
958958
<div
959959
ref={pieChartContainerRef}
960-
className="flex-shrink-0 w-64"
960+
className="shrink-0 w-64"
961961
onPointerLeave={() => {
962962
cancelPieLegendClear();
963963
setPieTooltipOpen(false);
@@ -1055,7 +1055,7 @@ export default function DashboardPage() {
10551055
>
10561056
<div className="flex items-center gap-2 mb-1">
10571057
<div
1058-
className={`w-3 h-3 rounded-full flex-shrink-0 transition-all duration-200 ${
1058+
className={`w-3 h-3 rounded-full shrink-0 transition-all duration-200 ${
10591059
isHighlighted && hoveredPieIndex === originalIndex ? 'ring-2 ring-offset-1' : ''
10601060
}`}
10611061
style={{
@@ -1710,7 +1710,7 @@ export default function DashboardPage() {
17101710
>
17111711
<div className="flex items-center gap-2 mb-1.5">
17121712
<div
1713-
className={`w-4 h-4 rounded-full flex-shrink-0 transition-all duration-200 ${
1713+
className={`w-4 h-4 rounded-full shrink-0 transition-all duration-200 ${
17141714
isHighlighted && hoveredPieIndex === originalIndex ? 'ring-2 ring-offset-1' : ''
17151715
}`}
17161716
style={{

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,19 @@
1313
},
1414
"dependencies": {
1515
"@vercel/postgres": "^0.10.0",
16-
"class-variance-authority": "^0.7.0",
17-
"clsx": "^2.1.1",
1816
"drizzle-orm": "^0.45.1",
1917
"lucide-react": "^0.562.0",
2018
"next": "^14.2.5",
2119
"react": "^18.2.0",
2220
"react-dom": "^18.2.0",
2321
"recharts": "^3.6.0",
24-
"tailwindcss-animate": "^1.0.7",
2522
"zod": "^3.22.4"
2623
},
2724
"devDependencies": {
25+
"@tailwindcss/postcss": "^4.1.18",
2826
"@types/node": "^20.12.12",
2927
"@types/react": "^18.2.66",
3028
"@types/react-dom": "^18.2.22",
31-
"autoprefixer": "^10.4.18",
3229
"drizzle-kit": "^0.31.8",
3330
"eslint": "^8.57.0",
3431
"eslint-config-next": "^14.2.5",

0 commit comments

Comments
 (0)