Gentler react animation

This commit is contained in:
Andy Smith
2025-05-06 17:02:03 -05:00
parent 9034498f40
commit 5b8f108316
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
/* Keyframes */
@keyframes react {
0% { transform: scale(0.3); opacity: 0; }
0% { transform: scale(0.85); opacity: 0; }
50% { transform: scale(1.15); opacity: 1; }
100% { transform: scale(1); }
}
+2 -1
View File
@@ -74,8 +74,9 @@
transition: none;
&.expanded {
animation: react 0.2s both;
animation: react 300ms both;
transform: translate3d(0, 0, 0);
transform-origin: left center;
}
.reaction__form-label:focus {
@@ -3,7 +3,7 @@
class: "reaction reaction__form expanded",
html: { aria: { label: "New reaction" } },
data: { controller: "form", turbo_frame: dom_id(@comment, :reacting), action: "keydown.esc->form#cancel" } do |form| %>
<label class="reaction__form-label flex gap" style="--column-gap: 0.7ch;">
<label class="reaction__form-label flex gap" style="--column-gap: 0.4ch;">
<figure class="reaction__avatar margin-none flex-item-no-shrink">
<%= avatar_tag Current.user %>
</figure>