mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-01-31 04:58:26 +00:00
Update site animation rules
This commit is contained in:
parent
7cfc8878c3
commit
0a48343eb7
@ -1,6 +1,6 @@
|
|||||||
@keyframes shake {
|
@keyframes shake {
|
||||||
$distance: 1px;
|
$distance: 1px;
|
||||||
from { transform: translate(-$distance); }
|
from { transform: translate(-$distance, $distance); }
|
||||||
to { transform: translate($distance); }
|
to { transform: translate($distance); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,18 +41,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion) {
|
|
||||||
@keyframes bounce {
|
|
||||||
$baseSize: 1em;
|
|
||||||
$baseRotation: 10deg;
|
|
||||||
from {
|
|
||||||
transform: rotate($baseRotation) translateX($baseSize)
|
|
||||||
translateY(-#{$baseSize / 5});
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: rotate(-$baseRotation) translateX(-$baseSize)
|
|
||||||
translateY(-#{$baseSize / 5});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -137,6 +137,6 @@ code[data-lang] {
|
|||||||
// Prefer reduced animations.
|
// Prefer reduced animations.
|
||||||
@media (prefers-reduced-motion) {
|
@media (prefers-reduced-motion) {
|
||||||
#logo svg {
|
#logo svg {
|
||||||
animation: bounce 0.6s ease-in-out alternate infinite;
|
animation: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,3 +22,9 @@
|
|||||||
.extreme-shake {
|
.extreme-shake {
|
||||||
animation: extreme-shake 0.1s alternate ease-in-out infinite;
|
animation: extreme-shake 0.1s alternate ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion) {
|
||||||
|
.shake, .extreme-shake {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user