responsive-units
What it does
This skill reviews a stylesheet for fixed pixel font sizes and widths, and converts them to relative units. It is for front-end developers who want layouts that respect user settings and fit many screen sizes.
When to use it
- ✓When you ask the agent to make a stylesheet more flexible for different screens.
- ✓When users who increase their default font size find that text on your site does not grow.
- ✓When you want fewer breakpoints by letting elements adapt to the space they have.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-units/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
“Some visitors increase their font size but my text does not change. Can you convert the fixed pixel sizes in my CSS to relative units?”
5 new skills a week. 1 minute to read.
How it works
The agent finds pixel-based font sizes, widths, and spacing values that should adapt. It converts font sizes to rem, widths to percentages or flex and grid layouts, and suggests clamp for smooth scaling of headings.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Use relative units for responsive layouts
Fixed pixel values override user browser preferences, making your site inaccessible to users who increase their default font size (a common accommodation for low vision). Relative units also reduce the number of breakpoints needed — elements naturally adapt to available space rather than requiring explicit overrides at every viewport width.
Quick Reference
- Use rem for font sizes — it respects user browser font size preferences
- Use % or flex/grid for widths — they adapt to the parent container
- Use em for component-relative spacing (padding, border-radius)
- Use clamp() for fluid typography that scales smoothly between breakpoints
Check
Find all px-based font-size, width, and padding values in this CSS file that should use relative units instead.
Fix
Convert fixed px font sizes to rem equivalents and replace fixed widths with percentage or relative alternatives.
Explain
Explain the difference between rem, em, %, vw, and vh, and when to use each one.
Code Review
Review stylesheets, component styles, and responsive states related to Use relative units for responsive layouts. 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.
Rule page: https://frontendchecklist.io/rules/css/responsive-units
FAQ
Why does rem help?
It is based on the user's default font size, so text grows when they change their browser setting.
When should I use em?
The skill suggests em for spacing and corners that should scale with the component.
What does clamp do?
It lets text grow smoothly between a minimum and maximum size as the screen changes.
Details
Original description by the author
Use when reviewing stylesheets, component styles, and responsive behavior related to Use relative units for responsive layouts. Check the rendered layout across breakpoints and interaction states before proposing a fix.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2999
- 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
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.