Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work properly when animating font-size #70

Open
AlexandreBernard opened this issue Sep 3, 2024 · 2 comments
Open

Does not work properly when animating font-size #70

AlexandreBernard opened this issue Sep 3, 2024 · 2 comments

Comments

@AlexandreBernard
Copy link

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

@STRML
Copy link
Owner

STRML commented Sep 3, 2024 via email

@AlexandreBernard
Copy link
Author

I will give it another look. My previous attempt was on Chrome and when applying an animation on the font-size property of the element it resulted in a font size that was too big

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants