Missing viewport meta tag
Without <meta name="viewport">, mobile browsers assume a ~980px desktop canvas and shrink the whole page to fit, so text is unreadable and tap targets are tiny. AI scaffolds often generate the component tree but leave the base HTML document untouched, so this one line never gets added. It is the single biggest reason an otherwise-fine page looks broken on a phone.
Symptoms
How VibeCheck catches it
In your widget · Problems
To your coding agent · MCP
The same string in your widget and in your agent’s context — no screenshot, no copy-paste.
Root causes
The fix
Add a viewport meta tag to the document head. width=device-width tells the browser to use the physical device width as the layout viewport; initial-scale=1 disables the initial zoom. Do not set maximum-scale or user-scalable=no — that breaks accessibility for users who need to zoom.
- Open your document head (
index.html,app.html, or your framework’s metadata config) - Add
<meta name="viewport" content="width=device-width, initial-scale=1"> - Reload on a real phone or device-emulation and confirm the layout uses the full width
<meta name="viewport" content="width=device-width, initial-scale=1" />FAQ
- Should I set
user-scalable=noormaximum-scale=1? - No. Disabling zoom is a WCAG accessibility failure — users with low vision rely on pinch-to-zoom.
width=device-width,initial-scale=1is all you need. - Does Next.js add the viewport tag automatically?
- Next injects a sensible default, but you should declare the
viewportexport explicitly so it is intentional and reviewable. Never hard-code the<meta>tag in Next’s App Router. - Why does my media query not work on mobile without this tag?
- Without the viewport tag the layout viewport defaults to ~980px, so min-width/max-width breakpoints compare against 980, not the real device width. The tag makes the layout viewport equal the device width.