PX Forums demoYou are browsing as a visitor. Try it as: Member · Moderator · AdminOne click, no password. All changes are reset every night at 03:45 CET.
Skip to content

Fluid typography with clamp(): what values do you use?

Log in
Replies
7
Voices
8
Views
460
Last activity
Omar Haddad Topic starter Helper367 karma46 posts · Joined Dec 2026

I am looking for a scale that works from 360 px to 1440 px.

Choose a reaction
Reply
Elena Petrova Helper577 karma41 posts · Joined Dec 2026

A trick that helped me: design the mobile layout first, then add columns as the screen grows.

Choose a reaction
Reply
Hannah Lindqvist Moderator597 karma46 posts · Joined Dec 2026

Thanks for sharing. Could you post the CSS for the header?

Choose a reaction
Reply
Sam O'Connor Member114 karma32 posts · Joined Dec 2026

Here is the variable I use for spacing:

:root { --space: clamp(1rem, 2.5vw, 2rem); }
Choose a reaction
Reply
Ivan Kovač Member207 karma37 posts · Joined Dec 2026

@demo-elena ↗:

A trick that helped me: design the mobile layout first, then add columns as the screen grows.

Great tip, I did not know that.

Choose a reaction
Reply
Nora Bergström Member225 karma42 posts · Joined Dec 2026

Have you tested it with a long title? It might wrap awkwardly on small screens.

Choose a reaction
Reply
Aisha Khan Member302 karma32 posts · Joined Dec 2026

I would increase the contrast a bit; the grey text fails AA on the white background.

Choose a reaction
Reply
Daniel Reyes Expert876 karma52 posts · Joined Dec 2026

Looks good! The spacing between the cards is really nice.

Choose a reaction
Reply