Try a hover animation, prefer utility classes

This commit is contained in:
Jason Zimdars
2024-08-22 10:22:09 -05:00
parent f48df75c9c
commit e142ea370b
3 changed files with 9 additions and 6 deletions
+7
View File
@@ -11,6 +11,13 @@
75% { transform: translateX(1rem); }
}
@keyframes shimmy {
0% { transform: translateX(-0.5rem); }
25% { transform: translateX(0.5rem); }
50% { transform: translateX(-0.2rem); }
75% { transform: translateX(0.2rem); }
}
@keyframes splat {
0% { transform: scale(150%); opacity: 0; }
29% { transform: scale(150%); opacity: 0; }
+1 -5
View File
@@ -3,11 +3,6 @@
}
.windshield {
align-items: end;
background-color: var(--color-bg);
display: inline-flex;
flex-wrap: wrap;
justify-content: center;
margin-block: clamp(var(--block-space), 3%, calc(var(--block-space) * 2));
> * {
@@ -51,6 +46,7 @@
@media (hover: hover) {
.windshield &:hover {
animation: shimmy 400ms normal forwards ease-out;
scale: 1.1;
z-index: 999;
+1 -1
View File
@@ -25,7 +25,7 @@
</nav>
<% end %>
<section class="windshield">
<section class="windshield flex-inline flex-wrap gap-half justify-center align-end">
<%= render @splats.last(10) %>
</section>