Backdrop Grayscale

Apply a grayscale filter to the area behind an element.

Newly available

This feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Chrome
Edge
Firefox
Safari

Usage

Grayscale

Use the bf-g-[value] utilities to apply a grayscale filter to the backdrop.

bf-g-1
<div class="bg-white/50 bf-g-1 ...">...</div>

Responsiveness

Use breakpoint prefixes to target different screen sizes.

sm:bf-g-[value]
Small640px
md:bf-g-[value]
Medium768px
lg:bf-g-[value]
Large1024px
xxl:bf-g-[value]
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:bf-g-[value]