Fix scroll-reveal animation flicker by adding !important and disabling transitions
This commit is contained in:
@@ -99,13 +99,21 @@ a:hover { color: var(--color-primary); }
|
|||||||
|
|
||||||
/* ── Scroll-reveal animation classes ───────────────────────── */
|
/* ── Scroll-reveal animation classes ───────────────────────── */
|
||||||
.scroll-hidden {
|
.scroll-hidden {
|
||||||
opacity: 0;
|
opacity: 0 !important;
|
||||||
transform: translateY(24px);
|
transform: translateY(24px) !important;
|
||||||
|
/* Prevent transition: all on card elements from animating the hide,
|
||||||
|
which would cause a visible fade-out flicker and race conditions
|
||||||
|
with IntersectionObserver — especially after Gutenberg re-saves
|
||||||
|
inject inline styles onto the block element. */
|
||||||
|
transition: none !important;
|
||||||
}
|
}
|
||||||
.scroll-visible {
|
.scroll-visible {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
transition: opacity .5s ease, transform .5s ease;
|
/* !important ensures this wins over transition: all on .oribi-card
|
||||||
|
(same selector specificity, but .oribi-card appears later in the
|
||||||
|
stylesheet and would otherwise override this). */
|
||||||
|
transition: opacity .5s ease, transform .5s ease !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Smooth theme transition */
|
/* Smooth theme transition */
|
||||||
|
|||||||
Reference in New Issue
Block a user