sdxc

Type to search, or start from one of these:

layout

position-try-fallbacks

Applies the CSS Anchor Positioning position-try-fallbacks property, listing named tactics or --custom-position-try references tried in order when the preferred position overflows its containing block.

import { positionTryFallbacks } from "@sdxc/u/layout";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.positionTryFallbacks("flip-block")css({ positionTryFallbacks: "flip-block" })
u.positionTryFallbacks("flip-block", "flip-inline")css({ positionTryFallbacks: "flip-block, flip-inline" })

Using a custom value

Every scale argument also takes a raw CSS value, which passes through untouched.

u.positionTryFallbacks("flip-block")

Applying on a state

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

u.hover(u.positionTryFallbacks("flip-block"))

Responsive design

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

u.at("md", u.positionTryFallbacks("flip-block"))

Signature

u.positionTryFallbacks(...values: string[])