-
Notifications
You must be signed in to change notification settings - Fork 42
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
SplitType not working as expected in WebFlow project #56
Comments
It might have something to do with your font loading. Your font gets loaded after the DOM, so because the fallback font is wider than your own font, When I open your page for the first time, I get that behaviour. Afterwards, the font gets cached and loads with the DOM on refresh. |
It's rendering correctly every time on my end. Were you able to fix the problem? I think it was probably due to font loading as @beanduong suggested. |
Any recommendation how to fix the problem? tried
Not yet, still testing it. |
CSS-Tricks has a good article on Flash of unstyled text (FOUT). I have personally used |
Thanks for the help, I will check it out. We are using Webflow for this project. |
Try setting the font family on the heading to system fonts and see if the problem still occurs. If this eliminates the problem, then it is definitely due to SplitType being called before your font has loaded. |
This is also something I have been experiencing for a while. I'm using Next js (13), even using the |
Hi @dongepulango , were you able to fix this? I'm also using Webflow and experimenting the same issue, thanks! |
Thanks, this solved it for me. If I were you, I would create a troubleshooting section in the readme and include this, since it seems to be a common issue |
A workaround is to lower the font size after splitting |
I have no idea what's causing this bug. When i go to my page, sometimes it will split the lines correctly and sometimes it will split additional line. I get the bug 1 out of 10 if I do refresh, mostly when i first open the tab with the link.
Please help how can I prevent this. thanks
Correct:
![Screenshot 2023-01-17 at 19 26 46](https://user-images.githubusercontent.com/5156884/217227530-d62602e4-7858-426a-b488-7fdeaed74543.png)
With bug:
![Screenshot 2023-01-17 at 19 26 21](https://user-images.githubusercontent.com/5156884/217227707-88af9c38-d6d5-4bd0-973a-5e7d4a2038ab.png)
Here is the link: https://creatd-bb.webflow.io/
The text was updated successfully, but these errors were encountered: