I've been trying to animate font size to avoid having a brutal glitch when fitting huge titles to the page and it does not work
If I understood properly how it's working it tries different font sizes until the span matches the container width. Am I correct?
As a suggestion I would say that if we want an animated version we could have two spans. One that only serves the purpose of determining the font-size and that should not affect the visual (position absolute and visibility hidden, container being relative) and then apply the font size only with the final result with the css transition applied to the font-size property
I've been trying to animate font size to avoid having a brutal glitch when fitting huge titles to the page and it does not work
If I understood properly how it's working it tries different font sizes until the span matches the container width. Am I correct?
As a suggestion I would say that if we want an animated version we could have two spans. One that only serves the purpose of determining the font-size and that should not affect the visual (position absolute and visibility hidden, container being relative) and then apply the font size only with the final result with the css transition applied to the font-size property