Skip to content

Commit

Permalink
Stop processing ScrollTimeline props if no animation-related properti…
Browse files Browse the repository at this point in the history
…es have been declared (#154)

* Don’t bother extracting data from animation-related properties if there are none declared

* Code formatting
  • Loading branch information
bramus authored Sep 13, 2023
1 parent a3355c2 commit 55f29d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scroll-timeline-css-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ export class StyleParser {
this.saveSourceSelectorToScrollTimeline(rule);
this.saveSubjectSelectorToViewTimeline(rule);

if (!hasAnimationTimeline && !hasAnimationName && !hasAnimation) {
return;
}

let timelineNames = [];
let animationNames = [];
let shouldReplacePart = false;
Expand Down

0 comments on commit 55f29d2

Please sign in to comment.