.tool-btn {
transition: background-color 0.2s ease,
border-color 0.2s ease,
transform 0.1s ease;
}
.tool-btn:hover {
background-color: #0f3460;
border-color: #00b4d8;
}
.tool-btn:active {
transform: scale(0.95);
}
.settings-panel {
transition: transform 0.3s ease;
}
.settings-panel.collapsed {
transform: translateX(100%);
}
When the .collapsed class is toggled, the panel slides off-screen to the right. Remove the class → it slides back in.
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.spinner {
width: 24px;
height: 24px;
border: 3px solid #2a2a4a;
border-top-color: #00b4d8;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes fadeIn {
from { opacity: 0; transform: scale(0.98); }
to { opacity: 1; transform: scale(1); }
}
.canvas-area img {
animation: fadeIn 0.3s ease-out;
}
When an image loads, it fades in and slightly scales up — a subtle effect that makes the app feel polished.
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
Try different timing functions, durations, and transforms. What feels snappy? What feels sluggish? What feels bouncy?
git switch -c design/PIXELCRAFT-007-animations
git add src/styles/
git commit -m "Add UI transitions and animations (PIXELCRAFT-007)"
git push origin design/PIXELCRAFT-007-animations
# PR → Review → Merge → Close ticket ✅
Animation frames and the rendering pipeline.
When you set transition: 0.3s, the browser calculates intermediate values for 18 frames (60fps × 0.3s). Each frame goes through: