Create visual rhythm through varied spacing—not the same padding everywhere. Embrace asymmetry and unexpected compositions. Break the grid intentionally for emphasis.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pbakaus/impeccable/llms.txt
Use this file to discover all available pages before exploring further.
Spacing Systems
Use 4pt Base, Not 8pt
8pt systems are too coarse—you’ll frequently need 12px (between 8 and 16). Use 4pt for granularity: 4, 8, 12, 16, 24, 32, 48, 64, 96px.Name Tokens Semantically
Name by relationship (--space-sm, --space-lg), not value (--spacing-8). Use gap instead of margins for sibling spacing—it eliminates margin collapse and cleanup hacks.
Grid Systems
The Self-Adjusting Grid
Userepeat(auto-fit, minmax(280px, 1fr)) for responsive grids without breakpoints. Columns are at least 280px, as many as fit per row, leftovers stretch.
grid-template-areas) and redefine them at breakpoints.
Visual Hierarchy
The Squint Test
Blur your eyes (or screenshot and blur). Can you still identify:- The most important element?
- The second most important?
- Clear groupings?
Hierarchy Through Multiple Dimensions
Don’t rely on size alone. Combine:| Tool | Strong Hierarchy | Weak Hierarchy |
|---|---|---|
| Size | 3:1 ratio or more | <2:1 ratio |
| Weight | Bold vs Regular | Medium vs Regular |
| Color | High contrast | Similar tones |
| Position | Top/left (primary) | Bottom/right |
| Space | Surrounded by white space | Crowded |
Cards Are Not Required
Cards are overused. Spacing and alignment create visual grouping naturally. Use cards only when:- Content is truly distinct and actionable
- Items need visual comparison in a grid
- Content needs clear interaction boundaries
Container Queries
Viewport queries are for page layouts. Container queries are for components:Optical Adjustments
Mathematical centering doesn’t always look centered to the human eye.Text Alignment
Text atmargin-left: 0 looks indented due to letterform whitespace—use negative margin (-0.05em) to optically align.
Icon Alignment
Geometrically centered icons often look off-center:- Play icons need to shift right
- Arrows shift toward their direction
Touch Targets vs Visual Size
Buttons can look small but need large touch targets (44px minimum). Use padding or pseudo-elements:Depth & Elevation
Create semantic z-index scales (dropdown → sticky → modal-backdrop → modal → toast → tooltip) instead of arbitrary numbers.Guidelines
DO
- Create visual rhythm through varied spacing—tight groupings, generous separations
- Use fluid spacing with clamp() that breathes on larger screens
- Use asymmetry and unexpected compositions; break the grid intentionally for emphasis
- Use
gapfor sibling spacing instead of margins - Create semantic z-index scales
DON’T
- Wrap everything in cards—not everything needs a container
- Nest cards inside cards—visual noise, flatten the hierarchy
- Use identical card grids—same-sized cards with icon + heading + text, repeated endlessly
- Use the hero metric layout template—big number, small label, supporting stats, gradient accent
- Center everything—left-aligned text with asymmetric layouts feels more designed
- Use the same spacing everywhere—without rhythm, layouts feel monotonous
- Use arbitrary spacing values outside your scale
