UI Baseline
Enforces an opinionated UI baseline to prevent AI-generated interface slop. Adapted from ibelick/baseline-ui for this vanilla CSS + React project.
Stack (Project-Specific)
- •MUST use vanilla CSS (files in
src/styles/) - •MUST NOT use Tailwind CSS
- •MUST use vanilla
requestAnimationFrameor CSS animations/transitions for motion - •MUST use the project's existing component primitives first
Components
- •MUST use accessible component primitives for anything with keyboard/focus behavior
- •MUST add an
aria-labelto icon-only buttons - •NEVER rebuild keyboard or focus behavior by hand unless explicitly requested
- •NEVER mix primitive systems within the same interaction surface
Interaction
- •MUST use a confirmation dialog for destructive or irreversible actions
- •SHOULD use structural skeletons for loading states
- •NEVER use
height: 100vh, useheight: 100dvh - •MUST respect
safe-area-insetfor fixed elements - •MUST show errors next to where the action happens
- •NEVER block paste in input or textarea elements
Animation
- •MUST animate only compositor props (
transform,opacity) by default - •NEVER animate layout properties (
width,height,top,left,margin,padding) on large surfaces - •SHOULD use
ease-outon entrance - •NEVER exceed
200msfor interaction feedback - •MUST pause looping animations when off-screen
- •MUST respect
prefers-reduced-motion - •SHOULD avoid animating large images or full-screen surfaces
Typography
- •MUST use
text-wrap: balancefor headings andtext-wrap: prettyfor body - •MUST use
font-variant-numeric: tabular-numsfor data
Layout
- •MUST use a fixed z-index scale (no arbitrary z-index values)
- •SHOULD use
aspect-ratiofor square/ratio-locked elements
Performance
- •NEVER animate large
blur()orbackdrop-filtersurfaces - •NEVER apply
will-changeoutside an active animation - •NEVER use
useEffectfor anything that can be expressed as render logic
Design
- •MUST give empty states one clear next action
- •SHOULD limit accent color usage to one per view
- •SHOULD use existing CSS custom properties before introducing new ones
- •Keep decorative fullscreen overlays non-interactive (
pointer-events: none)