Skip to content
Skillpedia
Websites & UI (frontend)75k · #2999

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.md

Copy 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

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-units/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#2999
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills