Filters
Backdrop Contrast Filter
Utilities for sets filter backdrop contrast effect to an element.
Variant
Active Checked Child-Selection Dark Mode Disabled Expand First-Last-Selection First-Letter Focus Focus-Visible Focus-Within Fullscreen Group-Focus Group-Hover Hover Landscape Light Mode Portrait Reduce-Motion Responsive Selection-Hover Visited
API
| class | css |
|---|---|
backdrop-filter {contrast} | backdrop-filter: brightness(var(--brightness)) contrast(var(--contrast)) saturate(var(--saturate)) blur(var(--blur)) |
| class | css |
|---|---|
| contrast-0 | --backdrop-contrast: 0 |
| contrast-1 | --backdrop-contrast: 1 |
| contrast-2 | --backdrop-contrast: 1.10 |
| contrast-3 | --backdrop-contrast: 1.20 |
| contrast-4 | --backdrop-contrast: 1.30 |
| contrast-5 | --backdrop-contrast: 1.40 |
| contrast-6 | --backdrop-contrast: 1.50 |
| contrast-7 | --backdrop-contrast: 1.60 |
| contrast-8 | --backdrop-contrast: 1.70 |
| contrast-9 | --backdrop-contrast: 1.80 |
| contrast-10 | --backdrop-contrast: 1.90 |
Usage
Filter: OFF
Filter: ON
Apply the backdrop-filter class first, and then set the filter in any order when with other filters.
<div class="width-48 height-48" style="background-image:url(...)">
<div class="backdrop-filter contrast-10 ... bg-tint-granite-1 bg-opacity-50 ... width-32 height-32">
...
</div>
</div>
HTML
.dummy-image {
@extend
.width-48,
.height-48;
}
.dummy-backdrop-blur {
@extend
.backdrop-filter,
.contrast-10,
.bg-tint-granite-5,
.bg-opacity-50,
.width-32,
.height-32;
}
SCSS
Mix with other filters, such as Backdrop Brightness, Backdrop Saturate, and Backdrop Blur.
<div class="width-48 height-48" style="background-image:url(...)">
<div class="backdrop-filter contrast-10 saturate-1 brightness-1 blur-2 ... bg-tint-granite-1 bg-opacity-50 ... width-32 height-32">
...
</div>
</div>
HTML
.dummy-image {
@extend
.width-48,
.height-48;
}
.dummy-backdrop-blur {
@extend
.backdrop-filter,
.contrast-10,
.brightness-1,
.saturate-1,
.blur-2
.bg-tint-granite-5,
.bg-opacity-50,
.width-32,
.height-32;
}
SCSS