Kovsky Posted August 14, 2022 Share Posted August 14, 2022 Hi everyoby, I am building this website (and got some trouble to fix the header) but that will be for another day i guess. The question is why does GSAP put more than 160 inline style property ?https://drawme-web-git-main-ptrkvsky.vercel.app/ Thank you Link to comment Share on other sites More sharing options...
Solution GreenSock Posted August 14, 2022 Solution Share Posted August 14, 2022 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 More sharing options...
Kovsky Posted August 21, 2022 Author Share Posted August 21, 2022 Ok got it, thank you, sorry for the late answer i was on holiday. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now