Ali Sariyer• 160
@alisariyer
Posted
Hi Victor,
Nice work. I use this technic for responsive font:
- Use a variable as --rem: 1rem in :root or html selector
- For any element you can use like: h1: { font-size: calc( var(--rem) * 1.4 ); } p: { font-size: var(--rem);}
- In media query: @media (min-width: 576px) { :root{ --rem: 1.1rem; } } So you can use this technic by changing variable value only. I hope it will be useful for you.
Have a nice coding :)
Marked as helpful
1
Victor• 290
@cervantesdeveloper
Posted
@alisariyer thanks, it seems complex but practical
0