Fix Animation Consistency & UX

This commit is contained in:
copecone committed 2026-04-03 11:20:44 +09:00
1 parent 9995b8c1e4
commit 4e356289a3
3 files changed
+20 -9

No files matched your search

+12 -3
View File
@@ -56,7 +56,7 @@ $default_animation_duration: 0.2s;
.chevron { .chevron {
width: 24px; height: 24px; width: 24px; height: 24px;
flex-shrink: 0; flex-shrink: 0;
transition: transform var(--dropdown-duration) $animation_timing; transition: transform var(--animation-duration) $animation_timing;
user-select: none; user-select: none;
&.open { &.open {
@@ -92,8 +92,16 @@ $default_animation_duration: 0.2s;
} }
@keyframes slideIn { @keyframes slideIn {
from { opacity: 0; transform: translateY(-8px); } from {
to { opacity: 1; transform: translateY(0); } transform: translateY(-8px);
pointer-events: none;
opacity: 0;
}
to {
transform: translateY(0);
pointer-events: auto;
opacity: 1;
}
} }
} }
@@ -105,6 +113,7 @@ $default_animation_duration: 0.2s;
position: relative; position: relative;
align-content: center; align-content: center;
transition: background-color var(--animation-duration) $animation_timing; transition: background-color var(--animation-duration) $animation_timing;
font-size: 16px;
&:hover, &.focused { &:hover, &.focused {
background-color: $hover_bg; background-color: $hover_bg;
+8 -2
View File
@@ -1,5 +1,9 @@
$animation_timing: cubic-bezier(0.16, 1, 0.3, 1);
$default_animation_duration: 0.2s;
:host { :host {
display: block; display: block;
--animation-duration: calc(#{$default_animation_duration} * var(--motion-duration-multiplier));
} }
.popup-backdrop { .popup-backdrop {
@@ -24,7 +28,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: visible; overflow: visible;
animation: popup-enter 0.2s cubic-bezier(0.16, 1, 0.3, 1); animation: popup-enter var(--animation-duration) $animation_timing;
outline: oklch(0 0 0 / 20%) 2px solid; outline: oklch(0 0 0 / 20%) 2px solid;
gap: 16px; gap: 16px;
@@ -46,11 +50,13 @@
@keyframes popup-enter { @keyframes popup-enter {
from { from {
transform: scale(0.95) translateY(10px); transform: scale(0.95) translateY(8px);
pointer-events: none;
opacity: 0; opacity: 0;
} }
to { to {
transform: scale(1) translateY(0); transform: scale(1) translateY(0);
pointer-events: auto;
opacity: 1; opacity: 1;
} }
} }
-4
View File
@@ -26,10 +26,6 @@ $default_animation_duration: 0.2s;
--animation-duration: calc(#{$default_animation_duration} * var(--motion-duration-multiplier)); --animation-duration: calc(#{$default_animation_duration} * var(--motion-duration-multiplier));
transition: background-color var(--animation-duration) $animation_timing; transition: background-color var(--animation-duration) $animation_timing;
&.reduce-motion {
--animation-duration: 0s;
}
&:hover, &:focus-within { &:hover, &:focus-within {
.switch-knob { .switch-knob {
will-change: transform; will-change: transform;