100x is a skill by a former Cursor engineer that turns prompts into formally verified, production-ready code
Phone-first web
Read this before the first screen when the target is a phone, a touch screen or a game. 100x shots finds these defects after the fact. This list prevents them, because retrofitting scaling costs more than starting right.
Layout
- Viewport meta on every page.
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">. Neveruser-scalable=no. - Full screen heights use
100dvhwith a100vhfallback. Plain100vhhides content behind the browser bars on phones. - Fixed bars pad with
env(safe-area-inset-top),-right,-bottomand-left, so notches and home indicators never cover controls. - Size layout in
rem,%,frandclamp(). Usepxfor hairlines and borders only. Fluid type, for examplefont-size: clamp(1rem, 0.9rem + 1vw, 1.25rem). - Design portrait and landscape. If one is unsupported, show a designed rotate screen, never a broken layout.
Touch
- Tap targets are at least 44 by 44 CSS pixels with 8px between them. The visible shape may be smaller if padding extends the hit area.
- Body text at 16px or more on phones. Inputs at 16px or more, or iOS zooms on focus. Nothing under 12px.
- Use pointer events, not mouse and touch pairs. Set
touch-action: manipulationon buttons andtouch-action: noneon game canvases. - Nothing important lives behind hover. Give every hover state a press equivalent.
- Games and full screen tools set
overscroll-behavior: containso a swipe never scrolls the page behind.
Canvas and pixels
- Size the backing store, not only the CSS box.
canvas.width = Math.round(cssWidth * dpr)withdpr = Math.min(devicePixelRatio, 3), thenctx.scale(dpr, dpr). - React to size changes with
ResizeObserveron the canvas parent. Re-layout without a reload on rotation and on window resize. - Pixel art uses
image-rendering: pixelatedat integer scales only.
Behavior
- One
requestAnimationFrameloop. Animatetransformandopacity. Cap particles and cap work per frame, because the target phone is not your laptop. - Save on
visibilitychangeandpagehide, not only on a timer. Keep a version key in saved data and migrate on load. Catch quota errors. - Honor
prefers-reduced-motionby shortening or removing large motion. - Installable when the brief wants it. A manifest,
theme-color, 192 and 512 icons and anapple-touch-icon.
Sizes to check
100x shots --matrix phone runs 320x568, 360x640, 390x844, 430x932 and the landscape sizes 844x390 and 640x360. --matrix all adds a 280 wide folded phone, two tablet sizes and six desktop sizes up to 3440x1440. all-rotate is all plus a rotation test that checks the layout again after the viewport rotates without a reload. 100x-must-not-break runs all-rotate for the screen-sizes kind.