Jump to content
Search Community

ScrollTrigger with Paroller.js && Loop with getRules, pseudoclasses

JoffreyPersia test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hi, 

I am starting to get things a little bit more complicated. 
Still a newbie btw. 

I created this second CodePen for the purpose of the example. 
I have 2 questions : 

  1. How can I change the ScrollTrigger position when I use the Paroller effet on the parent Div ? The trigger shifts. 
  2. I am trying, inside the loop, to have a tween that reduce the width to 0 of the texts's card. But I don't know the sentence for the getRules inside the loop. Maybe someone here know ? 

 

Thank you so much ! 
 

See the Pen JjyNdwL by pixelmort27 (@pixelmort27) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @JoffreyPersia!

 

  1. How can I change the ScrollTrigger position when I use the Paroller effet on the parent Div ? The trigger shifts. 

We can't offer support for third party libraries in these forums I'm afraid. You can adjust the position of the start and end trigger to take this into account though, maybe just start a few hundred pixels later?

  1. I am trying, inside the loop, to have a tween that reduce the width to 0 of the texts's card. But I don't know the sentence for the getRules inside the loop. Maybe someone here know ?

I would advise against targeting pseudo elements directly - CSS variables are the way to go now! Browser support is pretty good these days. Alternately, just use spans and animate them like normal.

See the Pen vYJmKjE?editors=0011 by GreenSock (@GreenSock) on CodePen



I hope this helps!

Link to comment
Share on other sites

7 hours ago, JoffreyPersia said:

So... With the css variables, the plugin GetRules is not so much useful ? 
In which cases this plugin is useful ? 

CSSRulePlugin was created before CSS variables were a thing, so I'd say the main use case is for browsers that don't support CSS variables (pretty old browsers). Otherwise, I'd personally stick with using CSS variables these days. 👍

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