Modern CSS Filter Effects
Grayscale, blur, hue, sepia, duotone and glow filters for photos, logos, icons and text.
1Blur Focus
Put it on a row of cards or images: the hovered item stays sharp while its siblings blur and fade. Class: fx-blur-focus
<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-blur-focus d-flex gap-2">
<img src="https://images.unsplash.com/photo-1757524492552-d47a66a2b63e?auto=format&fit=crop&w=800&h=800&q=70" alt="First gallery item" class="rounded-3 object-fit-cover" style="width:82px;height:110px"><img src="https://images.unsplash.com/photo-1513584684374-8bab748fbf90?auto=format&fit=crop&w=800&h=800&q=70" alt="Second gallery item" class="rounded-3 object-fit-cover" style="width:82px;height:110px"><img src="https://images.unsplash.com/photo-1582268611958-ebfd161ef9cf?auto=format&fit=crop&w=800&h=800&q=70" alt="Third gallery item" class="rounded-3 object-fit-cover" style="width:82px;height:110px">
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-blur-focus > * { transition: filter .4s ease, opacity .4s ease, transform .4s ease; }
.fx-blur-focus:hover > :not(:hover) { filter: blur(3px) saturate(.6); opacity: .65; }
.fx-blur-focus > :hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
.fx-blur-focus, .fx-blur-focus::before, .fx-blur-focus::after, .fx-blur-focus *, .fx-blur-focus *::before, .fx-blur-focus *::after { animation: none !important; transition: none !important; }
}2Hue Rotation
Continuously cycles the colours of a gradient, illustration or image through the colour wheel. Class: fx-hue-rotation
<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-hue-rotation rounded-circle" style="width:96px;height:96px;background:linear-gradient(135deg, var(--wt-primary), var(--wt-accent))">
</div>
<img src="https://images.unsplash.com/photo-1771366260867-7e07094579d7?auto=format&fit=crop&w=1200&h=800&q=70" alt="Photo cycling through hues" class="fx-hue-rotation object-fit-cover rounded-3" style="width:150px;height:110px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-hue-rotation { animation: fx-hue-rotation-hue 8s linear infinite; }
@keyframes fx-hue-rotation-hue { to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.fx-hue-rotation, .fx-hue-rotation::before, .fx-hue-rotation::after, .fx-hue-rotation *, .fx-hue-rotation *::before, .fx-hue-rotation *::after { animation: none !important; transition: none !important; }
}3Neon Glow
Wraps icons, logos and transparent images in a flickering neon halo using drop-shadow. Class: fx-filter-neon-glow
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="bg-dark rounded-4 p-4 d-flex gap-4 fs-1">
<span class="fx-filter-neon-glow"><i class="bi bi-lightning-charge-fill" aria-hidden="true"></i></span><span class="fx-filter-neon-glow"><i class="bi bi-music-note-beamed" aria-hidden="true"></i></span><span class="fx-filter-neon-glow"><i class="bi bi-moon-stars-fill" aria-hidden="true"></i></span>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-filter-neon-glow {
color: var(--wt-primary-ink);
filter: drop-shadow(0 0 4px var(--wt-primary)) drop-shadow(0 0 12px var(--wt-primary));
animation: fx-filter-neon-glow-flicker 3s linear infinite;
}
@keyframes fx-filter-neon-glow-flicker {
0%, 18%, 22%, 62%, 64%, 100% { filter: drop-shadow(0 0 4px var(--wt-primary)) drop-shadow(0 0 12px var(--wt-primary)); }
20%, 63% { filter: drop-shadow(0 0 1px var(--wt-primary)); }
}
@media (prefers-reduced-motion: reduce) {
.fx-filter-neon-glow, .fx-filter-neon-glow::before, .fx-filter-neon-glow::after, .fx-filter-neon-glow *, .fx-filter-neon-glow *::before, .fx-filter-neon-glow *::after { animation: none !important; transition: none !important; }
}