Filtros
Utilidades para aplicar filtros de rotación de tono de fondo a un elemento.
Clase | Estilos |
---|---|
backdrop-hue-rotate-<number> | backdrop-filter: hue-rotate(<number>deg); |
-backdrop-hue-rotate-<number> | backdrop-filter: hue-rotate(calc(<number>deg * -1)); |
backdrop-hue-rotate-(<custom-property>) | backdrop-filter: hue-rotate(var(<custom-property>)); |
backdrop-hue-rotate-[<value>] | backdrop-filter: hue-rotate(<value>); |
Usa utilidades como backdrop-hue-rotate-90
y backdrop-hue-rotate-180
para rotar el tono del fondo de un elemento:
backdrop-hue-rotate-90
backdrop-hue-rotate-180
backdrop-hue-rotate-270
<div class="bg-[url(/img/mountains.jpg)]"> <div class="bg-white/30 backdrop-hue-rotate-90 ..."></div></div><div class="bg-[url(/img/mountains.jpg)]"> <div class="bg-white/30 backdrop-hue-rotate-180 ..."></div></div><div class="bg-[url(/img/mountains.jpg)]"> <div class="bg-white/30 backdrop-hue-rotate-270 ..."></div></div>
Usa utilidades como -backdrop-hue-rotate-90
y -backdrop-hue-rotate-180
para establecer un valor negativo de rotación de tono de fondo:
-backdrop-hue-rotate-15
-backdrop-hue-rotate-45
-backdrop-hue-rotate-90
<div class="bg-[url(/img/mountains.jpg)]"> <div class="bg-white/30 -backdrop-hue-rotate-15 ..."></div></div><div class="bg-[url(/img/mountains.jpg)]"> <div class="bg-white/30 -backdrop-hue-rotate-45 ..."></div></div><div class="bg-[url(/img/mountains.jpg)]"> <div class="bg-white/30 -backdrop-hue-rotate-90 ..."></div></div>
Usa la sintaxis backdrop-hue-rotate-[<value>]
para establecer el backdrop hue rotation basado en un valor completamente personalizado:
<div class="backdrop-hue-rotate-[3.142rad] ..."> <!-- ... --></div>
Para variables CSS, también puedes usar la sintaxis backdrop-hue-rotate-(<custom-property>)
:
<div class="backdrop-hue-rotate-(--my-backdrop-hue-rotation) ..."> <!-- ... --></div>
Esto es solo un atajo para backdrop-hue-rotate-[var(<custom-property>)]
que agrega la función var()
por ti automáticamente.
Prefija una utilidad backdrop-filter: hue-rotate()
con una variante de breakpoint como md:
para aplicar la utilidad solo en tamaños de pantalla medium y superiores:
<div class="backdrop-hue-rotate-15 md:backdrop-hue-rotate-0 ..."> <!-- ... --></div>
Aprende más sobre el uso de variantes en la documentación de variantes.