Skip to content

Commit

Permalink
Adjust heading animation-timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
remino committed Apr 7, 2024
1 parent c662e42 commit f1ef416
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/css/_header.sass
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ header.sclf
transform-origin: center center

@supports (animation-timeline: scroll())
animation-range: contain 0% contain 100%, contain 30% contain 70%, contain 0% contain 100%
animation-range: contain 0% contain 100%, contain 0% contain 50%, contain 0% contain 100%

$child-center: math.ceil(math.div($children-count, 2))
@for $i from 1 through $child-center
&:nth-child(#{$child-center - $i}), &:nth-child(#{$child-center + $i})
&:nth-child(#{$child-center + 1 - $i}), &:nth-child(#{$child-center - 1 + $i})
--sclf-delay: #{$i * 4}

@supports (animation-timeline: scroll())
animation-range: contain #{$i * 4%} cover 100%, contain #{30 + $i * 4%} contain #{70 + $i * 8%}, contain #{$i * 4%} cover 100%
animation-range: contain #{$i * 4%} contain 100%, contain #{0 + $i * 4%} contain #{50 + $i * 4%}, contain #{$i * 4%} contain 100%

@for $i from 1 through $children-count
&:nth-child(#{$i})
Expand Down

0 comments on commit f1ef416

Please sign in to comment.