Skip to content

Commit

Permalink
✨ feat(animations.scss): Add new pulse and ping animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiderpig86 committed Dec 23, 2021
1 parent 72839d2 commit 5f13215
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
17 changes: 17 additions & 0 deletions dist/cirrus.css
Expand Up @@ -305,6 +305,17 @@ fieldset legend {
opacity: 1;
}
}
@keyframes pulse {
50% {
opacity: 0.5;
}
}
@keyframes ping {
75%, 100% {
transform: scale(2);
opacity: 0;
}
}
/* Hover animation */
.hover-grow {
/* Mouse leave */
Expand Down Expand Up @@ -387,6 +398,12 @@ fieldset legend {
.animated.paused {
animation-play-state: paused !important;
}
.animated.pulse {
animation: pulse 1.25s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.animated.ping {
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}
/* Spacing */
/* Breakpoints */
/* Fonts */
Expand Down
2 changes: 1 addition & 1 deletion dist/cirrus.min.css

Large diffs are not rendered by default.

24 changes: 23 additions & 1 deletion src/ext/animations.scss
Expand Up @@ -4,7 +4,6 @@
/* Keyframes */

/* Spinning loading animation */

@keyframes loading {
from {
transform: rotate(0deg);
Expand Down Expand Up @@ -86,6 +85,20 @@
}
}

@keyframes pulse {
50% {
opacity: 0.5;
}
}

@keyframes ping {
75%,
100% {
transform: scale(2);
opacity: 0;
}
}

/* Hover animation */
.hover-grow {
/* Mouse leave */
Expand Down Expand Up @@ -183,4 +196,13 @@
&.paused {
animation-play-state: paused !important;
}

// Useful for loaders
&.pulse {
animation: pulse 1.25s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

&.ping {
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}
}

0 comments on commit 5f13215

Please sign in to comment.