How to adjust the font size based on the content (which is a number and string) in a container?

jmjjeena

J E E N A R J U N

Posted on January 29, 2020

How to adjust the font size based on the content (which is a number and string) in a container?

I am having a container which takes in the amount and the currency. As the amount gets bigger and reaches near to the right padding (i.e., 16px), the font size should be reducing. At the same time the top padding of the currency should also change.

https://jsfiddle.net/jmjjeena/uzsL7n0c/

//////////////// REACT /////////////////
💖 💪 🙅 🚩
jmjjeena
J E E N A R J U N

Posted on January 29, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related