Jump to content
Search Community

Gsap inline style

Kovsky test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

Cool site! 🙌

 

Is that something that you set pinReparent: true on? That's the only explanation I can think of. And it does that in order to protect the element from other CSS that could contaminate it as well as keeping the styles that were set in its original context. For example, imagine that element is styled like this: 

.container .nested-container .thing {
  border: 1px solid red;
}

So it's nested inside several elements, but then if it gets reparented to the root element during pinning [without those inline styles], it'd suddenly lose the border because the selector no longer applies! 

 

See what I mean? 

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...