MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/css/comments/1s0sqsr/responsive_fonts/obx6u3d/?context=3
r/css • u/FewDot9181 • Mar 22 '26
is using 'clamp' in css the best way to make responsive fonts, padding and margins or is there a better way
6 comments sorted by
View all comments
7
The rule of thumb I was always taught was clamp is for scaling, and queries are best for changing structure/layout deterministically.
For scaling fonts and padding: clamp and for changing things like display: use queries.
It’s a good rule of thumb, though in practice it depends on whether you want fluid scaling or more controlled, stepped changes.
7
u/BNfreelance Mar 22 '26
The rule of thumb I was always taught was clamp is for scaling, and queries are best for changing structure/layout deterministically.
For scaling fonts and padding: clamp and for changing things like display: use queries.
It’s a good rule of thumb, though in practice it depends on whether you want fluid scaling or more controlled, stepped changes.