title: GSAP ScrollTrigger background color change animation not working well on Safari
body: <p>I'm trying to make a gsap animation that switches the viewport's background color depending on your scrolling position. The animation works great on Chrome and on FireFox, but on Safari it just looks bad, very laggy and the colors don't transition into the page, but rather just pop up with a delay.</p>
  <p>Here is my animation (I am using Vue.js)</p>
  <pre><code>backgroundAnimation() {
        let $projects = gsap.utils.toArray(this.htmlID + &quot; .project-wrapper&quot;);
        let projectListTl = gsap.timeline({
          scrollTrigger: {
            trigger: this.htmlID,
            start: &quot;top center&quot;,
            end: &quot;bottom center&quot;,
            ease: &quot;none&quot;,
            scrub: true,
            markers: false,
            onLeave: ({ progress, direction, isActive }) =&gt;
              document.documentElement.style.setProperty(&quot;--background&quot;, &quot;white&quot;),
          },
        });
        $projects.forEach(($project, i) =&gt; {
          projectListTl.to(&quot;html&quot;, {
            duration: 0.1,
            &quot;--background&quot;: $project.dataset.projectColor,
          });
          projectListTl.to(&quot;html&quot;, {
            delay: 0.3,
            duration: 0.2,
            &quot;--background&quot;: &quot;transparent&quot;,
          });
        });
      },
        
        
  (The method above runs when there is an update on the component)
    updated: function () {
      this.$nextTick(function () {
        this.backgroundAnimation();
        const self = this;
        ScrollTrigger.matchMedia({
          &quot;(min-width: 1024px)&quot;: function () {
            self.scrollAnimation();
          },
        });
      });
    },
  </code></pre>
  <p>Does anybody have any ideas as to why this is happening on Safari?</p>