API
Borders
Radius, borders, dividers, outline, and the focus ring.
The border shorthands sort one value into width and color: a color is a 1px solid border in that color, a number is that many pixels in --color-border, a length is the width in --color-border. The all-sides longhands (--border-width, --border-color, --border-style) win over a shorthand. Borders between direct children are the divide-x and divide-y switches, sized and colored by --divide on the container.
--ring draws a ring as a box-shadow, so it never moves layout: a number is pixels, a length passes through, and a negative width draws it inset (--ring: -2). It takes breakpoint and state tiers, so --ring: 2; --ring--md: -2 flips it inside from md up. --ring-offset adds a gap in --ring-offset-color.
A primitive's focus ring is separate: it reads the --ring-width token, and --focus-ring overrides it per element with the same signed width. --focus-ring: -2 keeps the ring inside the box (and its forced-colors outline with it), which keeps focus visible in a container that clips its overflow; on a plain link or element it sets the focus outline. It takes breakpoint tiers (--focus-ring--md: 3), and below a tier set alone the default ring stays.
Reference
| Utility | Writes | Value | Tiers | Notes |
|---|---|---|---|---|
--rounded | border-radius | any CSS value | — | --before-rounded / --after-rounded |
--border | border-width + border-color | color (1px solid), number (px wide, --color-border), or length | breakpoints, states | |
--border-x | border-inline width + color | color, number (px), or length | breakpoints, states | |
--border-y | border-block width + color | color, number (px), or length | breakpoints, states | |
--border-t | border-block-start width + color | color, number (px), or length | breakpoints, states | |
--border-r | border-inline-end width + color | color, number (px), or length | breakpoints, states | |
--border-b | border-block-end width + color | color, number (px), or length | breakpoints, states | |
--border-l | border-inline-start width + color | color, number (px), or length | breakpoints, states | |
--border-width | border-width | any CSS value | breakpoints, states | --before-border-width / --after-border-width |
--border-color | border-color | any CSS value | breakpoints, states | --before-border-color / --after-border-color |
--border-style | border-style | any CSS value | breakpoints, states | --before-border-style / --after-border-style |
--divide | border between direct children (divide-x / divide-y) | color, number (px), or length; set on the container | — | |
--outline | outline | any CSS value | — | --before-outline / --after-outline |
--ring | box-shadow (ring width) | number (px) or length; negative draws it inset | breakpoints, states | |
--ring-color | box-shadow (ring color) | any CSS value | breakpoints, states | works tier-only |
--ring-offset | box-shadow (ring offset width) | number (px) or length | breakpoints, states | |
--ring-offset-color | box-shadow (ring offset color) | any CSS value | breakpoints, states | works tier-only |
--focus-ring | a primitive's focus ring and the focus outline (width, inside or out) | number (px) or length; negative draws it inset (default --ring-width) | breakpoints |