Jump to content
Search Community

Why SplitText adds empty style and class to element?

AsKadir test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hey all,

I have a question about empty style and class that SplitText adds to an element,

In the demo it adds only empty style to h1, you can check it in your console.

But in my project it also add empty class, I can't recreate it in this codepen.

 

It doesn't bother me a lot, but maybe I'm doing something wrong?

Thanks in advance!

See the Pen abJbpZQ by ChicagoJostik (@ChicagoJostik) on CodePen

Link to comment
Share on other sites

  • Solution

Yeah, that's not a problem at all. SplitText needs to do some fancy footwork to do various calculations, which may involve setting (and possibly removing) styles in that process. It certainly doesn't hurt anything to have an empty style tag. As for the class, that sounds odd to me. What class is it adding exactly? And you can't reproduce the issue on CodePen? Sounds like there may be something funky in your local environment, but it's tough to say for sure. Are you positive that you matched everything in the CodePen from your local environment (code-wise)? 

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...