Filters
Utilities for applying backdrop saturation filters to an element.
Class | Styles |
---|---|
backdrop-saturate-<number> | backdrop-filter: saturate(<number>%); |
backdrop-saturate-(<custom-property>) | backdrop-filter: saturate(var(<custom-property>)); |
backdrop-saturate-[<value>] | backdrop-filter: saturate(<value>); |
Use utilities like backdrop-saturate-50
and backdrop-saturate-100
utilities to control the saturation of an element's backdrop:
Use the backdrop-saturate-[<value>]
syntax to set the backdrop saturation based on a completely custom value:
<div class="backdrop-saturate-[.25] ..."> <!-- ... --></div>
For CSS variables, you can also use the backdrop-saturate-(<custom-property>)
syntax:
<div class="backdrop-saturate-(--my-backdrop-saturation) ..."> <!-- ... --></div>
This is just a shorthand for backdrop-saturate-[var(<custom-property>)]
that adds the var()
function for you automatically.
Prefix a backdrop-filter: saturate()
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<div class="backdrop-saturate-50 md:backdrop-saturate-150 ..."> <!-- ... --></div>
Learn more about using variants in the variants documentation.