Border and Radius Utilities

Compose logical edges, semantic colors, token-driven widths and styles, and writing-mode-aware corner radii.

Border utilities separate presence, width, style, color, and radius. Class order in HTML does not affect the result.

Border anatomy

  • Presence: .border / .border-all, .border-block, .border-inline, .border-block-start, .border-block-end, .border-inline-start, and .border-inline-end
  • Width: .border-thin, .border-thick, .border-heavy, and .border-0
  • Style: .border-solid, .border-dashed, .border-dotted, .border-double, and .border-none
  • Contrast: .border-muted, .border-subtle, .border-default, and .border-overt
  • Brand and state: .border-accent, .border-secondary, .border-tertiary, .border-focus, .border-active, .border-success, .border-warning, .border-error, and .border-info
  • Context: .border-current, .border-inherit, and .border-transparent

Compose border anatomy

Presence, width, style, and semantic color are independent token-driven choices.

Default

Thin and solid

Emphasized

Thick accent

Attention

Heavy double

Drop zone

Dashed info

Logical edges

Logical utilities follow writing mode and direction. They are preferable to top/right/bottom/left helpers for reusable components.

Let inline start follow direction

The success edge moves from left in LTR to right in RTL without changing classes.

LTR inline start
RTL inline start
Both block edges

Remove an existing logical edge with .border-block-none, .border-inline-none, .border-block-start-none, .border-block-end-none, .border-inline-start-none, or .border-inline-end-none.

Radius scale and corner removal

Use .rounded-sm, .rounded, .rounded-md, .rounded-lg, .rounded-xl, .rounded-full, or .rounded-none. Logical reset utilities flatten one corner or an edge pair without replacing the starting radius.

Connect adjacent surfaces

Start with one radius, then flatten only the logical edge touching the neighboring surface.

No block-start corners
No block-end corners
No inline-start corners
No inline-end corners

Single-corner resets are .rounded-start-start-none, .rounded-start-end-none, .rounded-end-start-none, and .rounded-end-end-none.

Theme inputs

--border-width-thin, --border-width, --border-width-thick, --border-width-heavy, --border-style, and --border-color control the system. Widths increase automatically under prefers-contrast: high.