DEV Community

J E E N A R J U N
J E E N A R J U N

Posted on

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 /////////////////

Top comments (0)