overflow-guard
A Playwright tool that finds text overflow and clipping on mobile screens under different display conditions and records the results in reports.
What does it do?
It opens pages in Playwright’s Chromium and measures text across different screen widths, font sizes, and light and dark themes. After a check, it creates a terminal summary, report.json, and report.html. The HTML report includes screenshots marking affected elements. Existing Playwright tests can also call check(page, options) to receive findings and check information.
Key features
- Check for overflowing or clipped text across screen widths, font sizes, and themes
- Generate an HTML report with screenshots marking affected elements
- Output results as a JSON file and terminal summary
- Return exit code 1 when issues are found for use in CI checks
- Retrieve findings through a JavaScript API in existing Playwright tests