Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions website/src/css/animations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/* ===== XDC DOCS — Utility Animations ===== */
/* Principle: subtle, purposeful, restrained. No cheap effects. */

/* ===== Skeleton Shimmer (loading states) ===== */
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}

.skeleton {
background: linear-gradient(
90deg,
var(--ifm-color-emphasis-100) 25%,
var(--ifm-color-emphasis-200) 50%,
var(--ifm-color-emphasis-100) 75%
);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 8px;
}

/* ===== Reveal on scroll (CSS fallback, Framer Motion is primary) ===== */
.reveal {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
opacity: 1;
transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== Toast notification animations ===== */
@keyframes toast-slide-in {
from { opacity: 0; transform: translateX(16px); }
to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-slide-out {
from { opacity: 1; transform: translateX(0); }
to { opacity: 0; transform: translateX(16px); }
}

.toast-enter {
animation: toast-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
animation: toast-slide-out 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* ===== Accordion smooth expand ===== */
.accordion-content {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-content.open {
grid-template-rows: 1fr;
}

.accordion-inner {
overflow: hidden;
}

/* ===== Progress bar ===== */
.progress-fill {
background: var(--ifm-color-primary);
transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
border-radius: 9999px;
}

/* ===== Input focus ring ===== */
.input-focus {
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-focus:focus {
outline: none;
border-color: var(--ifm-color-primary);
box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.12);
}

/* ===== Glassmorphism utility ===== */
.glass {
background: rgba(255, 255, 255, 0.04);
backdrop-filter: blur(16px) saturate(160%);
-webkit-backdrop-filter: blur(16px) saturate(160%);
border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Reduced Motion Support ===== */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}

.reveal {
opacity: 1;
transform: none;
}
}
Loading