font-size
What it does
This skill reviews the font sizes in a site's CSS, especially for phones. It is for developers and designers who want readable text for every visitor.
When to use it
- ✓When body text on a phone is too small and visitors have to zoom.
- ✓When your CSS uses fixed pixel sizes that ignore browser text settings.
- ✓When you check a site against accessibility guidelines for text resizing.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/font-size/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you check my CSS to make sure the text is readable on mobile?”
5 new skills a week. 1 minute to read.
How it works
The agent finds font size declarations and flags body text below 16 pixels, or sizes that ignore user settings. It suggests relative units such as rem or em.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Use readable font sizes on mobile
Approximately 1 in 3 adults over 65 increases their browser's default font size. Low-vision users who cannot use screen magnifiers rely on browser font size settings as their primary accessibility tool. If font sizes are set in px only, browser font size preferences are ignored entirely. Text smaller than 16px on mobile forces all users to zoom in, breaking the page layout and triggering horizontal scroll. iOS Safari's auto-inflation of sub-12px text causes unintended layout shifts.
Quick Reference
- Body text should be at least 16px (1rem) on mobile — smaller sizes force users to zoom
- Avoid
font-sizevalues below 12px; iOS Safari ignores values below 12px and auto-inflates them - Use
remoremunits instead ofpxso text scales with the user's browser font size preference - Never set
font-size: 100%on<html>using an override that blocks user scaling — respect the browser default (16px) - WCAG 2.1 SC 1.4.4 (Resize Text, Level AA): text must be resizable up to 200% without loss of content or functionality
Check
Find all CSS font-size declarations. Flag: (1) body text or paragraph text set below 16px (or 1rem); (2) any font-size below 12px; (3) font-sizes set in px on <html> or <body> that override the browser default; (4) font-sizes that do not scale proportionally when the browser zoom is set to 200% (test in Chrome DevTools by setting font-size in browser settings or using zoom). Check that text remains readable and layout does not break at 200% zoom.
Fix
(1) Convert pixel font sizes to rem units: divide the pixel value by 16 (the browser default) — e.g., 14px becomes 0.875rem. (2) Set body text to at least 1rem (16px equivalent) on mobile. (3) Replace html { font-size: 10px } (a common reset trick) with html { font-size: 62.5% } or avoid font-size resets entirely — instead use rem values calculated from the actual 16px base. (4) If small text is intentional (captions, footnotes), ensure it is at least 0.75rem (12px) and use font-size: 0.75rem so it scales with user preferences.
Explain
WCAG 2.1 SC 1.4.4 (Resize Text) requires that text can be resized up to 200% without loss of content or functionality, except for captions and images of text. Using px units for font sizes makes text immune to browser font size settings (though not to browser zoom). Using rem or em units allows text to scale with the root font size, which the user can adjust in browser settings — this is the preferred approach. iOS Safari also has a built-in heuristic that inflates text smaller than 12px when the page is displayed in mobile view, which can cause layout inconsistencies.
Code Review
Review stylesheets, component styles, and responsive states related to Use readable font sizes on mobile. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
FAQ
Why do relative units help?
They scale with the visitor's browser font setting, so people who need larger text get it.
What is the smallest size it accepts?
The skill says to avoid font sizes below 12 pixels, which iOS Safari may enlarge automatically.
Which accessibility rule does it mention?
It mentions WCAG 1.4.4, which asks that text can be resized up to 200 percent without losing content.
Details
Original description by the author
Use when applies to all CSS `font-size` declarations, particularly those using `px` units for body text, UI labels, and navigation. Use when auditing mobile responsiveness and accessibility compliance. Check for `font-size` in media queries targeting small screens.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2854
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
canvas
394kLets your agent show a hosted visual widget on a connected Mac panel, then hide the panel or move it to another page.
control-ui
394kHelps your agent organize and troubleshoot the OpenClaw Control UI, including sessions, dashboards, and connected Gateways.
diagram-maker
394kHelps your agent create clear diagrams as SVG, HTML, or editable Excalidraw files for processes, system architecture, and whiteboard sketches.