Last active
November 26, 2021 10:20
-
-
Save davidsharp/56d983789c09e5b14c32859c293e8611 to your computer and use it in GitHub Desktop.
A neat little star wipe for Remark.js presentations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-webkit-keyframes wipe { | |
0% { | |
-webkit-mask-size: 0% 0%; | |
} | |
100% { | |
-webkit-mask-size: 550% 550%; | |
} | |
} | |
.remark-visible .remark-slide-content { | |
-webkit-mask-image: url(./star.svg); | |
-webkit-mask-clip: border-box; | |
-webkit-mask-size: 550% 550%; | |
-webkit-mask-repeat: no-repeat; | |
-webkit-mask-position: center; | |
-webkit-animation: wipe 1s 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg xmlns="http://www.w3.org/2000/svg" width="300px" height="275px" viewBox="0 0 300 275" version="1.1"> | |
<polygon points="150,25 179,111 269,111 197,165 223,251 150,200 77,251 103,165 31,111 121,111"/> | |
</svg> |
As mentioned above, .remark-visible .remark-slide-content.star {...}
would apply it only to slides with a class of star
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can specify this on specific slides only by using remarks class properties, allowing for different zoom wipes per slide, or none at all