# Graffiti CSS Framework > A minimal CSS framework with fluid typography, responsive layouts, and utility classes ## Package Structure The framework is split into two entry points for optimal bundle size: - **Main CSS** (`@drop-in/graffiti`): Core framework with typography, layouts, and utilities - **Decks CSS** (`@drop-in/graffiti/decks`): Optional styles for `@drop-in/decks` components (accordion, dialog, drawer, menu, toast) Import only what you need: ```js import '@drop-in/graffiti' // Base framework import '@drop-in/graffiti/decks' // Optional decks components ``` ## CSS Variables ### Typography & Fluid System - `--fl`: Fluid level (-1 to 6) - Set on elements to control fluid typography scale - `--font-sans`: System font stack - `--font-size-min`: 14px (minimum font size) - `--font-size-max`: 18px (maximum font size) - `--font-ratio-min`: 1.2 (modular scale ratio for small screens) - `--font-ratio-max`: 1.33 (modular scale ratio for large screens) - `--variable-unit`: 100vi (viewport inline) or 100cqi (container query inline) when using `.fc` ### Spacing - `--vs-s`: 0.5rem (vertical spacing small) - `--vs-base`: 1rem (vertical spacing base) - `--vs-m`: 1.5rem (vertical spacing medium) - `--vs-l`: 2rem (vertical spacing large) - `--vs-xl`: 4rem (vertical spacing extra large) ### Border Radius - `--br-xs`: 2px - `--br-s`: 4px - `--br-m`: 8px - `--br-l`: 16px ### Padding - `--pad-xs`: 2px - `--pad-s`: 6px - `--pad-m`: 12px - `--pad-l`: 25px ### Shadows Layered, adaptive shadows (deeper in dark mode): - `--shadow-1`: Subtle shadow - `--shadow-2`: Light lift - `--shadow-3`: Moderate depth - `--shadow-4`: Strong elevation - `--shadow-5`: Dramatic shadow - `--shadow-6`: Maximum depth - `--box`: Inset highlights with subtle shadow ### Line Heights - `--lh-tight`: 1.2 (tight line height for headings/display text) - `--lh-normal`: 1.5 (default for body text) - `--lh-loose`: 1.8 (extra space for large body text) ### Easing Functions Modern `linear()` based easing functions: - `--ease-smooth`: Smooth acceleration/deceleration - `--ease-bounce`: Bouncy spring-like motion - `--ease-emphasized`: Emphasized material design easing ### Colors (OKLCH) Perceptually uniform OKLCH color space with automatic 1-9 scales generated via relative color syntax. Base colors are scale 5. Lower numbers are lighter, higher numbers are darker. #### Yellow - `--yellow` (scale 5): oklch(0.88 0.15 95) - Base yellow - `--yellow-1` through `--yellow-9`: Full scale from lightest to darkest #### Orange - `--orange` (scale 5): oklch(0.75 0.18 65) - Base orange - `--orange-1` through `--orange-9`: Full scale from lightest to darkest #### Red - `--red` (scale 5): oklch(0.62 0.22 35) - Base red - `--red-1` through `--red-9`: Full scale from lightest to darkest #### Pink - `--pink` (scale 5): oklch(0.62 0.25 350) - Base pink - `--pink-1` through `--pink-9`: Full scale from lightest to darkest #### Green - `--green` (scale 5): oklch(0.72 0.18 165) - Base green - `--green-1` through `--green-9`: Full scale from lightest to darkest #### Teal - `--teal` (scale 5): oklch(0.82 0.08 185) - Base teal - `--teal-1` through `--teal-9`: Full scale from lightest to darkest #### Blue - `--blue` (scale 5): oklch(0.5 0.28 270) - Base blue - `--blue-1` through `--blue-9`: Full scale from lightest to darkest #### Neutral Gray - `--gray-1` through `--gray-9`: Neutral gray scale from lightest to darkest (no base color variable) ### Theming (light-dark mode) - `--fg`: Foreground color (auto switches: black in light, white in dark) - `--bg`: Background color (auto switches: white in light, black in dark) - `--tint-or-shade`: 5% foreground mix (subtle backgrounds) - `--tint-or-shade-harder`: 10% foreground mix (stronger backgrounds) ### Layout Customization - `--gap`: Default gap for layout utilities (default: varies per layout) - `--layout-gap`: Override gap for specific layout - `--min-card-width`: Minimum card width for `.layout-card` (default: 290px) - `--layout-min-card-width`: Override for specific card layout - `--max-width`: Max width for `.layout-readable` (default: 1200px) - `--layout-max-width`: Override for specific readable layout - `--padding`: Inline padding for `.layout-readable` (default: 2rem) - `--layout-padding`: Override for specific readable layout ## Typography Classes ### Font Size Utilities - `.fs-xs`: Extra small (--fl: -1) - `.fs-base`: Base size (--fl: 0) - `.fs-s`: Small heading (--fl: 1) - `.fs-m`: Medium heading (--fl: 2) - `.fs-l`: Large heading (--fl: 3) - `.fs-xl`: Extra large (--fl: 4) - `.fs-xxl`: Double extra large (--fl: 5) - `.fs-xxxl`: Triple extra large (--fl: 6) ### Heading Classes - `.h1` through `.h6`: Apply heading styles to non-heading elements ### Fluid Typography - `.fc` or `.fluid-text-container`: Makes typography responsive to container width instead of viewport (uses container queries) ## Layout Classes ### `.layout-card` Auto-fill responsive card grid ```css /* Usage */