viewports

Installation
SKILL.md

If .ux-profile.md exists at the project root, read it before changing layout, color, or type.

Intent

Desktop-first layouts break on a phone: a locked sidebar, a 1440px canvas, hover-only actions, and type squeezed below 12px. This skill locks three viewport tokens and a short contract so every screen works at 375px and 1280px. Pattern-specific stacking lives in page-patterns, not here.

Hard Rules (Non-Negotiable)

  • No page-level horizontal overflow at 375px or 1280px. document.documentElement.scrollWidth must not exceed clientWidth at either width. Tables and boards may scroll inside one region. Never shrink type below 12px to fit (typography).
  • Hit targets match .ux-profile.md. WCAG AA: 44×44px. AAA: 48×48px. If the profile is missing, use 44×44. Icon-only controls get padding to meet the floor; a 16px glyph is not the tap area.
  • Hover is extra, not the only path. Every primary action exists in the layout without hover. Hover-only chrome is allowed only inside @media (hover: hover).
  • Cap the main page, not the app. html, body, .app, and chrome (sidebar, header) are width: 100% with no max-width. Apply max-width: var(--vp-wide) only to the main page content (main, .page). Ban a root, shell, or card locked to a pixel width ≥768px with no wrap or inner-scroll plan.
  • Three tokens only — narrow / medium / wide. Do not invent a fourth breakpoint for a single screen. Values live in reference/breakpoint-tokens.md.
  • Chrome collapses on narrow. A persistent sidebar (≥200px) on a 375px viewport is a fail. Use a menu control that opens the same nav. Then apply the named pattern’s Narrow line in the page-patterns catalog.

Design Heuristics & Taste Principles

Installs
58
GitHub Stars
2
First Seen
Sep 14, 2026