diff --git a/PRPs/ai_docs/UI_STANDARDS.md b/PRPs/ai_docs/UI_STANDARDS.md index b50e0491..8baca1be 100644 --- a/PRPs/ai_docs/UI_STANDARDS.md +++ b/PRPs/ai_docs/UI_STANDARDS.md @@ -197,18 +197,96 @@ grep -rn "type=\"checkbox\"\|type=\"radio\"" [path] --include="*.tsx" --- -## 5. PRIMITIVES LIBRARY +## 5. CENTRALIZED STYLING (styles.ts) + +### CRITICAL RULE: Use glassCard & glassmorphism from styles.ts + +**Location**: `@/features/ui/primitives/styles.ts` + +All styling definitions MUST come from the centralized `glassCard` and `glassmorphism` objects in styles.ts. Do NOT duplicate style objects in components. + +### Anti-Patterns +```tsx +// ❌ WRONG - Duplicating style definitions +const edgeColors = { + cyan: { solid: "bg-cyan-500", gradient: "from-cyan-500/40", border: "border-cyan-500/30" }, + // ... more colors +}; + +// ❌ WRONG - Local variant objects +const colorVariants = { + cyan: "shadow-cyan-500/20", + blue: "shadow-blue-500/20", +}; +``` + +### Good Examples +```tsx +// ✅ CORRECT - Use centralized definitions +const edgeStyle = glassCard.edgeColors[edgeColor]; +