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="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<div class="fx-blur-focus flex gap-2">
<img src="../assets/img/square-2.svg" alt="First gallery item" class="rounded-lg object-cover" style="width:82px;height:110px"><img src="../assets/img/square-4.svg" alt="Second gallery item" class="rounded-lg object-cover" style="width:82px;height:110px"><img src="../assets/img/square-6.svg" alt="Third gallery item" class="rounded-lg object-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; }
}2Duotone Effect
Turns any photo into a two-colour print in the theme colours; put the class on a wrapper around the img. Class: fx-duotone-effect
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<figure class="fx-duotone-effect rounded-lg mb-0">
<img src="../assets/img/photo-6.svg" alt="Duotone photo" class="object-cover" style="width:210px;height:145px">
</figure>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-duotone-effect { position: relative; display: inline-block; overflow: hidden; isolation: isolate; background: var(--wt-accent); }
.fx-duotone-effect img { display: block; filter: grayscale(1) contrast(1.2) brightness(1.1); mix-blend-mode: multiply; transition: filter .5s; }
.fx-duotone-effect::after {
content: ""; position: absolute; inset: 0; pointer-events: none;
background: var(--wt-primary); mix-blend-mode: lighten; transition: opacity .5s;
}
.fx-duotone-effect:hover::after { opacity: 0; }
.fx-duotone-effect:hover img { filter: grayscale(0); mix-blend-mode: normal; }
@media (prefers-reduced-motion: reduce) {
.fx-duotone-effect, .fx-duotone-effect::before, .fx-duotone-effect::after, .fx-duotone-effect *, .fx-duotone-effect *::before, .fx-duotone-effect *::after { animation: none !important; transition: none !important; }
}3Saturation Boost
Desaturated at rest, vivid on hover - draws attention to the product the visitor is looking at. Class: fx-saturation-boost
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<img src="../assets/img/product-5.svg" alt="Product with boosted colour" class="fx-saturation-boost rounded-lg object-cover" style="width:120px;height:120px"><img src="../assets/img/product-6.svg" alt="Second product" class="fx-saturation-boost rounded-lg object-cover" style="width:120px;height:120px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-saturation-boost { filter: saturate(.6); transition: filter .4s ease, transform .4s ease; }
.fx-saturation-boost:hover, .fx-saturation-boost:focus-visible { filter: saturate(1.8); transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) {
.fx-saturation-boost, .fx-saturation-boost::before, .fx-saturation-boost::after, .fx-saturation-boost *, .fx-saturation-boost *::before, .fx-saturation-boost *::after { animation: none !important; transition: none !important; }
}