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

Often "Freezes" at minimum size #39

Open
brandonkal opened this issue Sep 23, 2018 · 8 comments
Open

Often "Freezes" at minimum size #39

brandonkal opened this issue Sep 23, 2018 · 8 comments

Comments

@brandonkal
Copy link

I use this with a Gatsby site. Often the font size will initially load at the minimum font size and it does not update.

@sis-dk
Copy link

sis-dk commented May 2, 2019

Did you find a fix?

@brandonkal
Copy link
Author

No I did not. I ended up implementing a component like this using CSS calc().

However, it is not perfect with SSR as the text will be streamed at minimum size in the HTML and stay that way until react hydrates.

@42x42x42
Copy link

Try to use a parameter 'throttle' i.e 1000 milliseconds, it should calculate height with delay when text, styles, etc already fully loaded.

@ceiphr
Copy link

ceiphr commented Jun 24, 2021

Same issue. @brandonkal would you be willing to share your CSS solution?

@koraysels
Copy link

same problem using nextjs. IU tried loading it dynamically but still it won't work.

@brandonkal
Copy link
Author

@ceiphr No longer using calc for other reasons but the idea is to figure out what size you want the text at different breakpoints and build an algebraic function to achieve that initial sizing as a function of view width.

@ceiphr
Copy link

ceiphr commented Oct 7, 2021

@ceiphr No longer using calc for other reasons but the idea is to figure out what size you want the text at different breakpoints and build an algebraic function to achieve that initial sizing as a function of view width.

Makes sense, thank you!

@Arnavop
Copy link

Arnavop commented May 28, 2024

i am still facing this issue
is there any fix available?

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

6 participants