From 9759db54cabd4513142693971061f896d5642e98 Mon Sep 17 00:00:00 2001 From: kurihada Date: Thu, 26 Feb 2026 16:18:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=85=E8=89=B2?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=20text-white=20=E6=96=87=E5=AD=97?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E8=A7=81=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=AE=89=E5=85=A8=E8=89=B2=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 极速救场标题、个人中心导航和输入框改用语义色 --- .cursor/rules/project-conventions.mdc | 7 +++++++ src/app/panic/page.tsx | 2 +- src/app/profile/page.tsx | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.cursor/rules/project-conventions.mdc b/.cursor/rules/project-conventions.mdc index 2eaf669..c9fde6f 100644 --- a/.cursor/rules/project-conventions.mdc +++ b/.cursor/rules/project-conventions.mdc @@ -35,6 +35,13 @@ alwaysApply: true - `overflow-y-auto scrollbar-none` for scrollable pages - Extract reusable UI patterns into shared components (modals, cards, empty states) +## Theme-Safe Colors + +- **Never use `text-white` for content text on page backgrounds** — it becomes invisible in light mode +- Use semantic colors: `text-heading`, `text-foreground`, `text-secondary`, `text-muted` for content text +- `text-white` is only correct on **colored backgrounds** (buttons, badges, gradient cards, overlays) +- Same applies to `bg-black` — prefer `bg-background`, `bg-surface`, `bg-elevated` + ## Loading States - **Page-level and list-level loading**: always use skeleton screens (`src/components/Skeleton.tsx`), never bare spinners diff --git a/src/app/panic/page.tsx b/src/app/panic/page.tsx index 46f9fe8..b6b6e8c 100644 --- a/src/app/panic/page.tsx +++ b/src/app/panic/page.tsx @@ -267,7 +267,7 @@ export default function PanicPage() {
-

+

⚡ 极速救场

diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx index ad22db1..28ca239 100644 --- a/src/app/profile/page.tsx +++ b/src/app/profile/page.tsx @@ -260,7 +260,7 @@ export default function ProfilePage() {

@@ -297,7 +297,7 @@ export default function ProfilePage() { > -

个人中心

+

个人中心

@@ -329,7 +329,7 @@ export default function ProfilePage() { }} maxLength={16} autoFocus - className="h-8 flex-1 rounded-lg border-none bg-elevated px-2 text-sm text-white outline-none ring-1 ring-border focus:ring-2 focus:ring-accent/50" + className="h-8 flex-1 rounded-lg border-none bg-elevated px-2 text-sm text-foreground outline-none ring-1 ring-border focus:ring-2 focus:ring-accent/50" />