--- description: Tailwind CSS utility-first styling conventions for AIUI globs: "**/*.vue,**/*.css,**/*.ts" alwaysApply: false --- # Tailwind CSS Styling ## 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 ## Typography Scale ``` text-xs = 12px (metadata, timestamps) text-sm = 14px (body text, buttons) text-base = 16px (default body, inputs) text-lg = 18px (subtitles) text-xl = 20px (card titles) text-2xl = 24px (section headings) text-3xl = 30px (page headings) 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 ## Shadows - `shadow-sm` — subtle elevation - `shadow-md` — standard card - `shadow-lg` — modal, dropdown - `shadow-xl` — hero card ## Glass Morphism For cards over complex backgrounds: ```html