Press/to search

Filters

Backdrop Contrast v1.1.0

Utilities for sets filter backdrop contrast effect to an element.


Class

classcss
backdrop-filter {contrast}backdrop-filter: brightness(var(--brightness)) contrast(var(--contrast)) saturate(var(--saturate)) blur(var(--blur))
Note: Your browser does not currently support the utilities.
classcss
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: OFFFilter: ON

Apply the backdrop-filter class first, and then set the filter in any order when with other filters.

<!-- Example -->
<y style="background-image:url(...)">
<y class="backdrop-filter contrast-10 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>

<y class="relative ...">
<img src="...">
<y class="absolute top-0 left-0">
<y class="backdrop-filter contrast-10 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>
</y>

Mix with other filters, such as Backdrop Brightness, Backdrop Saturate, and Backdrop Blur.

<!-- Example -->
<y style="background-image:url(...)">
<y class="backdrop-filter contrast-10 brightness-1 saturate-1 blur-2 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>

<y class="relative ...">
<img src="...">
<y class="absolute top-0 left-0">
<y class="backdrop-filter contrast-10 brightness-1 saturate-1 blur-2 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>
</y>

Customization

Read more information about using the Plugin API, and Responsive or Pseudo-Class Variants configuration with the Plugin API.

// Add Values
@include yogurt(
$class: 'backdrop.contrast',
$property: --backdrop-contrast,
$modifier: (
1: 1.10,
2: 2.20
//...
)
);

Variant

ResponsiveDark ModeLight ModeReduce-MotionPortraitLandscapeHoverGroup-HoverFocusGroup-FocusFocus-VisibleFocus-WithinActiveVisitedCheckedDisabled

Default enabled variants. Read more information about the Responsive and Pseudo-Class Variants.