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-1596247290824-e9f12b8c574f?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-1620829813573-7c9e1877706f?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-1531538606174-0f90ff5dce83?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; }
}2Multiple Filters
Stacks contrast, saturation and a drop shadow, then swaps to a warmer combination on hover. Class: fx-multiple-filters
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<img src="../assets/img/product-3.svg" alt="Product with layered filters" class="fx-multiple-filters object-fit-contain" style="width:150px;height:150px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-multiple-filters { filter: contrast(1.15) saturate(1.3) drop-shadow(0 10px 14px rgba(var(--wt-primary-rgb), .35)); transition: filter .5s ease; }
.fx-multiple-filters:hover { filter: contrast(1.25) saturate(1.6) sepia(.25) drop-shadow(0 16px 22px rgba(var(--wt-accent-rgb), .45)); }
@media (prefers-reduced-motion: reduce) {
.fx-multiple-filters, .fx-multiple-filters::before, .fx-multiple-filters::after, .fx-multiple-filters *, .fx-multiple-filters *::before, .fx-multiple-filters *::after { animation: none !important; transition: none !important; }
}3Glitch Filter
Short bursts of hue, contrast and position jumps make an image look like a corrupted signal. Class: fx-glitch-filter
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<img src="https://images.unsplash.com/photo-1565598611425-45b0878bdd0b?auto=format&fit=crop&w=1200&h=800&q=70" alt="Photo with a glitch filter" class="fx-glitch-filter object-fit-cover rounded-3" style="width:200px;height:140px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-glitch-filter { animation: fx-glitch-filter-glitch 3.5s steps(1) infinite; }
@keyframes fx-glitch-filter-glitch {
0%, 86%, 100% { filter: none; transform: none; }
88% { filter: hue-rotate(90deg) saturate(3) contrast(1.6); transform: translate(-4px, 1px); }
90% { filter: invert(.15) contrast(2); transform: translate(4px, -2px) skewX(6deg); }
92% { filter: hue-rotate(-70deg) saturate(2); transform: translate(-2px, 0); }
94% { filter: brightness(1.6); transform: translate(2px, 1px); }
}
@media (prefers-reduced-motion: reduce) {
.fx-glitch-filter, .fx-glitch-filter::before, .fx-glitch-filter::after, .fx-glitch-filter *, .fx-glitch-filter *::before, .fx-glitch-filter *::after { animation: none !important; transition: none !important; }
}