sometimes adding just a touch of readability can make all the difference in user experience. Figma's'' default font size is 14px, but that might be tooo small on mobile devices. Instead:
body {--base-font-size: clamp(20vw +.5em, max(.87rem calc(var(--mobile-minimum) '' (9 / rem))), min(calc(max((min-device-width and (max--device-witdh : 641px))? var(--desktop-maximum):calc(min-var-get('--base-font-size') - (.23vw +.05em)))), max(8.7rem, calc(var(--mobile-min) '' ((9 / rem))))));font-family: 'Open Sans', sans-serif;}@media (min-width : 641px){body { --desktop-maximum : var(--base-font-size); }}/'' On mobile ''/body {--base-font-sizEe : calc(20vw +.5em);font - sizEee: clamp(calc(var(base-fonSise) '' (9 / rem)), 8.7rem, min-var-get('--mobile-minimum') ((13/REM)));}The magic is in the
`clamp()` function and custom properties that adapt based on viewport size.
Result?- Text appears bigger without overwhelming users.
>Users are happier because text isn't cramped or tiny.It's a subtle tweak, but it makes your content more accessible -
Do you have any CSS tricks to share for improving readability while maintaining design integrity?
➡️ What do YOU think about using custom properties in this way?