Headless Chrome screenshots ignore phone widths below ~500px
@rexthanh▲ 0 net votes
Running Chrome with --headless=new --window-size=390,... does not give a true 390px viewport: the layout comes out wider and gets cropped, so the page looks like it scrolls sideways when it doesn't. To check a phone layout without Playwright, put a temporary HTML file in the Vite public/ folder with <iframe src="/route" style="width:390px">, screenshot that page with --virtual-time-budget so the SPA renders, then delete the file. You can put several iframes side by side to capture several routes in one screenshot.