Skip to content

Commit

Permalink
Add Scroll-driven appearing to articles
Browse files Browse the repository at this point in the history
  • Loading branch information
MeFoDy committed Feb 7, 2024
1 parent 9cd4554 commit bff6820
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
true,
{
"ignoreProperties": [
"print-color-adjust"
"print-color-adjust",
"animation-timeline"
]
}
],
Expand Down
21 changes: 21 additions & 0 deletions src/styles/blocks/collection.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,24 @@ h2.collection__item-title {
margin-top: 1em;
}
}

@supports (view-timeline: --works) {
.collection__item {
view-timeline-axis: block;
view-timeline-name: --collection-item-in-view;
animation: linear scroll-appear both;
animation-duration: auto;
animation-timeline: --collection-item-in-view;
animation-range: contain 0% contain 40%;
}

@keyframes scroll-appear {
0% {
opacity: 0.2;
}

100% {
opacity: 1;
}
}
}

0 comments on commit bff6820

Please sign in to comment.