diff --git a/.cursor/rules/02-tailwind-styling.mdc b/.cursor/rules/02-tailwind-styling.mdc index fc122072..eeb2e0c8 100644 --- a/.cursor/rules/02-tailwind-styling.mdc +++ b/.cursor/rules/02-tailwind-styling.mdc @@ -1,17 +1,21 @@ --- -description: Tailwind CSS utility-first styling conventions for AIUI +description: Tailwind CSS utility-first styling conventions for AIUI, ported from Archy globs: "**/*.vue,**/*.css,**/*.ts" alwaysApply: false --- # Tailwind CSS Styling +## Source of Truth +All glass morphism, container, and button patterns originate from the Archy project (`/Projects/Archy/neode-ui/src/style.css`). When in doubt, match Archy exactly. + ## Utility-First Use Tailwind utilities directly in templates. Extract to component classes only when a pattern repeats 3+ times. ## 4px Spacing Grid -All spacing follows a 4px base grid: -- 1 = 4px, 2 = 8px, 3 = 12px, 4 = 16px, 5 = 20px, 6 = 24px, 8 = 32px, 12 = 48px, 16 = 64px +``` +1 = 4px, 2 = 8px, 3 = 12px, 4 = 16px, 5 = 20px, 6 = 24px, 7 = 28px, 8 = 32px +``` ## Typography Scale ``` @@ -27,52 +31,82 @@ text-4xl = 36px (hero headings) Font weights: `font-normal` (body), `font-medium` (emphasis), `font-semibold` (headings/buttons), `font-bold` (strong emphasis). -## Border Radius -- `rounded-md` (6px) — inputs -- `rounded-lg` (8px) — buttons, standard cards -- `rounded-2xl` (16px) — modern cards, modals -- `rounded-full` — pills, avatars +## Glass Morphism (from Archy) -## Shadows -- `shadow-sm` — subtle elevation -- `shadow-md` — standard card -- `shadow-lg` — modal, dropdown -- `shadow-xl` — hero card +### Containers (exact Archy values) +- `.glass` — base: `bg: rgba(0,0,0,0.35)`, `blur(18px)`, `border: 1px solid rgba(255,255,255,0.18)`, `shadow: 0 8px 24px rgba(0,0,0,0.45)` +- `.glass-strong` — stronger blur: same bg but `blur(24px)` +- `.glass-card` — primary card: `bg: rgba(0,0,0,0.65)`, `blur(18px)`, `border-radius: 1rem`, same border/shadow +- `.gradient-card` — gradient: `linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.8) 100%)` +- `.gradient-card-dark` — dark gradient: `linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 100%)` +- `.gradient-border-container` — gradient border with inner glass, `border-radius: 1.5rem` +- `.toast-glass` — `border-radius: 0.75rem`, same glass as `.glass-card` -## Glass Morphism -For cards over complex backgrounds: +### Buttons (exact Archy values) +- `.glass-button` — 48px height, `bg: rgba(0,0,0,0.6)`, `blur(18px)`, border `rgba(255,255,255,0.18)`, `color: rgba(255,255,255,0.9)` +- `.glass-button-sm` — compact variant (auto height, `py-1.5 px-3`) +- `.gradient-button` — primary action: `linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.8) 100%)`, border `rgba(255,255,255,0.2)`, intensifies on hover + +### Icon / Ghost buttons (Archy pattern) ```html -
+