Simply update the code with what i've been using lately so it only animate when the `.Loader` is created by react. Except for PROD where animation runs anytime. Use both the new `:has()` pseudo-class and fallback to regular `:not(:only-child())` for unsupported browser (Firefox)
44 lines
1.1 KiB
CSS
44 lines
1.1 KiB
CSS
@-moz-document domain("ppr-app.supplierxm.salsify.com"),
|
|
domain("ppr-admin.supplierxm.salsify.com/") {
|
|
:root {
|
|
--stripe-size: 100px;
|
|
--color1: hsla(194, 71%, 30%, 1);
|
|
--color2: hsla(194, 77%, 35%, 1);
|
|
--duration: 1s;
|
|
--state: paused;
|
|
}
|
|
|
|
.AuthLayoutFooter,
|
|
.Navbar.navbar.Navbar--PPR.bg-inverse {
|
|
background: repeating-linear-gradient(-45deg, var(--color2) 25%, var(--color2) 50%, var(--color1) 50%, var(--color1) 75%);
|
|
background-color: var(--color1);
|
|
background-size: var(--stripe-size) var(--stripe-size);
|
|
animation: alkegrad var(--duration) linear 0s infinite normal var(--state);
|
|
will-change: background-position;
|
|
}
|
|
|
|
.AuthLayoutFooter {
|
|
--stripe-size: 200px;
|
|
--duration: 40s;
|
|
}
|
|
|
|
.PageTop>.navbar:where( :has(+ .Loader),
|
|
:not(:only-child)) {
|
|
--state: running;
|
|
}
|
|
|
|
.PageTop>.Loader {
|
|
visibility: hidden;
|
|
animation: none;
|
|
}
|
|
|
|
@keyframes alkegrad {
|
|
from {
|
|
background-position: 0 0;
|
|
}
|
|
|
|
to {
|
|
background-position: var(--stripe-size) 0;
|
|
}
|
|
}
|
|
} |