Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49362

Adjust font size dynamically at runtime

$
0
0

This is for Ionic 5, Angular 9, Capacitor 2.

Most of this app users have low vision ability. I need to make the capacity for user to adjust the font size in all areas. I am making variables in variables.scss:

--normalprint: 14px;
--titleprint: 18px;
--largetitleprint: 22px;
--font-size-adj: 1.4vw;

In the other scss files, I can refer those variables and calculate:

.normalprint {
font-size: calc(var(--normalprint) + var(--font-size-adj));
text-align: left;
}

But how to do it dinamic from user input? I want to use a “font-size-adj” value entered from the user. But I don’t see the way to use it.

Thank you.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49362

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>