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" />