Viewport strategy aligns CSS pixel assumptions with device rendering contexts.
Key rule
Use proper viewport meta in HTML and test zoom/reflow scenarios.
Pitfall
Missing viewport meta causes mobile browsers to emulate wider desktop layout, breaking responsive assumptions.
Important interview questions and answers
- Q: Why viewport meta matters for CSS?
A: It defines how CSS pixels map to device width on mobile. - Q: Should you disable user zoom?
A: No, it harms accessibility. - Q: What to check after viewport config?
A: Text scaling, tap target size, and horizontal overflow.
Tip: Design mobile-first: base rules, then min-width media queries.