Home › Forums › JavaScript › Resizing font based on container width using vanilla JS and while Loop › Reply To: Resizing font based on container width using vanilla JS and while Loop
August 29, 2018 at 11:08 pm
#275791
Shikkediel
Participant
I think you’d need to update contentHeight
inside the loop, it currently stays at the value that was originally set (and if that is beyond the container height, it will loop infinitely).
Not that I would take this approach though, I would likely go with a single scale transform myself.