Modern CSS Gradient Effects
Animated, mesh, conic and text gradients built from the theme colours.
1Animated Rainbow
A full-spectrum gradient that flows endlessly across banners, buttons and progress bars. Class: fx-animated-rainbow
The calm way to run a busy team
Every colour, always moving.
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="fx-animated-rainbow rounded-4 p-4 text-center w-100" style="max-width:18rem;text-shadow:0 1px 3px rgba(0,0,0,.3)">
<h3 class="h5 fw-bold mb-1">The calm way to run a busy team</h3>
<p class="small mb-0">Every colour, always moving.</p>
</div>
<button type="button" class="btn rounded-pill border-0 fx-animated-rainbow">Celebrate</button>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-animated-rainbow {
color: #fff;
background: linear-gradient(90deg, #ff3d7f, #ff9f1c, #ffd23f, #3bce73, #2ec4ff, #7b5cff, #ff3d7f);
background-size: 300% 100%;
animation: fx-animated-rainbow-flow 8s linear infinite;
}
@keyframes fx-animated-rainbow-flow { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
.fx-animated-rainbow, .fx-animated-rainbow::before, .fx-animated-rainbow::after, .fx-animated-rainbow *, .fx-animated-rainbow *::before, .fx-animated-rainbow *::after { animation: none !important; transition: none !important; }
}2Shimmer Effect
A diagonal light sweep that glides across buttons, cards or images every few seconds. Class: fx-shimmer-effect
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<button type="button" class="btn btn-primary btn-lg fx-shimmer-effect">Claim offer</button>
<div class="fx-shimmer-effect rounded-3">
<img src="../assets/img/product-2.svg" alt="Shiny product" class="d-block object-fit-cover" style="width:110px;height:110px">
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-shimmer-effect { position: relative; overflow: hidden; isolation: isolate; }
.fx-shimmer-effect::after {
content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; pointer-events: none;
background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
transform: translateX(-120%);
animation: fx-shimmer-effect-sweep 3.2s ease-in-out infinite;
}
@keyframes fx-shimmer-effect-sweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
.fx-shimmer-effect, .fx-shimmer-effect::before, .fx-shimmer-effect::after, .fx-shimmer-effect *, .fx-shimmer-effect *::before, .fx-shimmer-effect *::after { animation: none !important; transition: none !important; }
}3Text Mask
Large text that works as a window onto a moving gradient - or onto an image set with an inline background-image. Class: fx-text-mask
SHINE
Explore
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="text-center">
<div class="display-3 fw-bold lh-1 fx-text-mask">
SHINE
</div>
<div class="display-5 fw-bold lh-1 fx-text-mask" style="--fx-mask-img:initial;background-image:url(https://images.unsplash.com/photo-1690264459911-6d68c747d8a7?auto=format&fit=crop&w=1200&h=800&q=70)">
Explore
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-text-mask {
color: var(--wt-primary-ink);
background-image: var(--fx-mask-img, linear-gradient(135deg, var(--wt-primary) 0%, var(--wt-accent) 30%, var(--wt-secondary) 60%, var(--wt-primary) 100%));
background-size: cover; background-position: 0% 50%;
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent;
animation: fx-text-mask-pan 10s ease-in-out infinite alternate;
}
.fx-text-mask:not([style*="--fx-mask-img"]) { background-size: 300% 300%; }
@keyframes fx-text-mask-pan { to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) {
.fx-text-mask, .fx-text-mask::before, .fx-text-mask::after, .fx-text-mask *, .fx-text-mask *::before, .fx-text-mask *::after { animation: none !important; transition: none !important; }
}