Sizing Units

Which CSS unit a value should be written in. rem for anything a text-size preference must move — type, control heights, padding around text. px only for what must not move — hairlines, borders, shadow offsets. Relative units for layout widths. Use when defining spacing and sizing tokens, choosing between px and rem, setting control heights, writing media queries, or fixing a layout that breaks when the user enlarges text.

majiayu000 2de81dd 2 files · 6.7 KB Updated 567 repo stars

File contents

majiayu000/claude-skill-registry-data/tree/main/design/sizing-units commit 2de81dd61c

Frequently asked questions

npx skillmds add majiayu000/sizing-units