sdxc

Type to search, or start from one of these:

layout

anchor-name

Applies anchor-name, the *declaring* half of anchor positioning: it goes on the element anchored **to**, and positionAnchor points back at this name.

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

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.anchorName("tooltip-trigger")css({ anchorName: "--tooltip-trigger" })
u.anchorName("menu-button")css({ anchorName: "--menu-button" })

Using a custom value

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

u.anchorName("tooltip-trigger")

Applying on a state

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

u.hover(u.anchorName("tooltip-trigger"))

Responsive design

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

u.at("md", u.anchorName("tooltip-trigger"))

Signature

u.anchorName(name: string)