front-ui-tweaker/PERF banner.css
Simon Priet d258f86c9a
Set envs to animate on loading only (except PROD) (#18)
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)
2023-05-25 23:15:05 +02:00

45 lines
1.1 KiB
CSS

@-moz-document domain("ltg-app.supplierxm.salsify.com"),
domain("ltg-admin.supplierxm.salsify.com") {
:root {
--stripe-size: 100px;
--color1: hsl(180, 63%, 30%);
--color2: hsl(180, 63%, 37%);
--duration: 1s;
--state: running;
}
.AuthLayoutFooter,
.Navbar.navbar.Navbar--PPR.bg-inverse {
background: repeating-linear-gradient(-45deg, hsla(261, 80%, 59%, 0) 25%, var(--color1) 50%, var(--color1) 75%);
background-color: var(--color2);
background-size: var(--stripe-size) var(--stripe-size);
animation: alkegrad var(--duration) linear 0s infinite normal var(--state);
transition: background 200ms linear;
}
.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;
}
}
}