Add FLIP tab animations for open, close, and reorder

Implements FLIP (First, Last, Invert, Play) animations for tab reordering, opening, and closing in the tab bar. Tabs now animate smoothly when added, removed, or reordered, improving visual feedback and user experience. CSS classes and keyframes for enter and exit transitions are introduced, and the tab rendering logic is updated to measure and animate tab positions.
This commit is contained in:
2025-08-10 11:26:54 +12:00
parent 6b3b8465ce
commit a69b6195d1
2 changed files with 107 additions and 25 deletions
+29
View File
@@ -326,6 +326,35 @@ html, body {
background: #555;
}
/* Tab animations */
.tab--flip {
transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}
.tab--enter {
animation: tab-enter 160ms ease-out both;
}
.tab--closing {
animation: tab-exit 140ms ease-in both;
}
@keyframes tab-enter {
from {
opacity: 0;
transform: translateY(6px) scale(0.98);
}
to {
opacity: 1;
transform: none;
}
}
@keyframes tab-exit {
to {
opacity: 0;
transform: translateY(-6px) scale(0.95);
}
}
/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
* {