Press/to search

Filters

Backdrop Brightness v1.1.0

Utilities for sets filter backdrop brightness effect to an element.


Class

classcss
backdrop-filter {brightness}backdrop-filter: brightness(var(--brightness)) contrast(var(--contrast)) saturate(var(--saturate)) blur(var(--blur))
Note: Your browser does not currently support the utilities.
classcss
brightness-0--backdrop-brightness: 0
brightness-1--backdrop-brightness: 1
brightness-2--backdrop-brightness: 1.10
brightness-3--backdrop-brightness: 1.20
brightness-4--backdrop-brightness: 1.30
brightness-5--backdrop-brightness: 1.40
brightness-6--backdrop-brightness: 1.50
brightness-7--backdrop-brightness: 1.60
brightness-8--backdrop-brightness: 1.70
brightness-9--backdrop-brightness: 1.80
brightness-10--backdrop-brightness: 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 brightness-5 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>

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

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

<!-- Example -->
<y style="background-image:url(...)">
<y class="backdrop-filter brightness-5 contrast-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 brightness-5 contrast-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.brightness',
$property: --backdrop-brightness,
$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.