SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

backdropSepia

Shifts what shows through the element's translucent background toward a warm brown monochrome.

tsx
import { backdropSepia } from "@sdxc/u/effects";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.backdropSepia()css({ "--ui-backdrop-sepia": "1", backdropFilter: "... sepia(var(--ui-backdrop-sepia, 0))", WebkitBackdropFilter: "... sepia(var(--ui-backdrop-sepia, 0))" })
u.transparencySafe(u.backdropSepia(0.6))css({ "@media (prefers-reduced-transparency: no-preference)": { "--ui-backdrop-sepia": "0.6", backdropFilter: "...", WebkitBackdropFilter: "..." } })

Examples

Basic example

Use backdropSepia(n) to tone what shows through an element toward warm brown, where backdropSepia() with no argument converts it fully:

backdropSepia(0.5)
backdropSepia()
tsx
<div mix={[...]}>
	<div mix={[...]}>
		<div mix={[backdropSepia(0.5), ...]}>backdropSepia(0.5)</div>
	</div>
	<div mix={[...]}>
		<div mix={[backdropSepia(), ...]}>backdropSepia()</div>
	</div>
</div>

Applying on a state

Wrap the call in a state utility to scope it to one selector.

typescript
u.hover(u.backdropSepia())

Responsive design

Wrap the call in a container query to scope it to one width.

typescript
u.at("md", u.backdropSepia())

Signature

typescript
u.backdropSepia(value?: number | (string & {}))
@sdxc/u

Can’t find it? Contact us