Comments (9)
Yeah, I see what you mean. I'll take another look.
from splittype.
Hey I'd be happy to take a look at this...
Are you seeing a visible change in character spacing after the text is rendered?
from splittype.
Do you want me to reopen this?
from splittype.
Hello Luke, after reloading the page you can already see the change. Yes, it is quite visible, see this: https://streamable.com/atv8lo
from splittype.
Can you share the source code for this page? The text is split into lines, and the whole paragraph is wrapped as a single line element. This is usually a sign that split type is being called before the layout has rendered.
Are you using a react or something similar ?
from splittype.
No I am not using react, just webflow with codesandbox linked in.
Here you can preview my webflow site:
and here is the code for splitting and animating with gsap:
let typeSplit = new SplitType("[text-split]", {
types: "words, lines, chars",
tagName: "span"
});
// Link timelines to scroll position
function createScrollTrigger(triggerElement, timeline) {
// Play tl when scrolled into view (60% from top of screen)
ScrollTrigger.create({
trigger: triggerElement,
start: "top 80%",
onEnter: () => timeline.play()
});
}
$("[words-slide-up]").each(function (index) {
let tl = gsap.timeline({ paused: true });
tl.from($(this).find(".word"), {
rotation: 7,
autoAlpha: 0,
yPercent: 50,
duration: 0.6,
ease: "Expo.easeOut",
stagger: { each: 0.066 }
});
createScrollTrigger($(this), tl);
});
from splittype.
This issue is most likely related to using SplitType within WebFlow.
Unfortunately i'm not really familiar with WebFlow. But you need to ensure that SplitType is executed after the page content is fully rendered. If WebFlow is applying dynamic styles to the content at run time, you would need to make sure that SplitType executes after those styles have been applied.
A few things you could try for debugging...
- Remove all the animation code from your javascript, and just include the calls to splitType. See if the text is split into the correct html structure without a visible change.
- Try wrapping your javascript in a
setTimeout
with a of a delay of few seconds. - Try wrapping your javascript in an event listener on window "load"
- try disabling any other animations or transitions on the page
from splittype.
Thanks, I'll try everything, but the split type in the chars is moving the kerning, even if I fix the issue when loading after the content is fully rendered, doesn't it still look "bad"(kerning)?
from splittype.
I'm going to close this. Sorry I wasn't able to resolve this.
from splittype.
Related Issues (20)
- How do we return type back to original html content after animation is finished?? HOT 2
- Lines split incorrectly on Astro with View Transitions API HOT 2
- Text Splitting Issue When Moving Page HOT 8
- Google Tranlation HOT 1
- SplitType not including some spaces HOT 11
- Allow users to override the display and position style on nested elements HOT 9
- Typescript error on building NextJS 14 app HOT 1
- nasted element inside the target disappeared HOT 1
- Reverting split characters causes a jump in letter spacing on reset
- wrap elements in custom element to animate
- Large words are not breaking
- Provide rtl support HOT 1
- The rendered text on the finished site is clipped at the top
- 'isSplit' is missing the type declarations
- Option to keep certain groups of letters from splitting? (specialChars in SplitText)
- Option to change default display: inline-block?
- CDN Error | 520
- Words should not break
- Framer motion Next js Pages Router Using Split-type and LayoutID for loader
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from splittype.