sdxc

Type to search, or start from one of these:

color

outline-color

Applies an outline unconditionally, for a persistent or decorative edge.

import { outline } from "@sdxc/u/color";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.outline()css({ outlineColor: "var(--ui-ring, Highlight)", outlineWidth: "2px", outlineStyle: "solid" })
u.outline("danger")css({ outlineColor: "var(--ui-danger-ring)", outlineWidth: "2px", outlineStyle: "solid" })
u.outline(4)css({ outlineColor: "var(--ui-ring, Highlight)", outlineWidth: "4px", outlineStyle: "solid" })
u.outline("danger", 4)css({ outlineColor: "var(--ui-danger-ring)", outlineWidth: "4px", outlineStyle: "solid" })
u.outline({ color: "danger", offset: 4 })css({ outlineColor: "var(--ui-danger-ring)", outlineWidth: "2px", outlineStyle: "solid", outlineOffset: "4px" })
u.outline("none")css({ outline: "none" })

Using a custom value

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

u.outline()

Applying on a state

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

u.hover(u.outline())

Responsive design

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

u.at("md", u.outline())

Customizing the theme

The custom properties this utility reads, which a theme redefines.

Variable
--ui-danger-ring
--ui-ring

Signature

u.outline()