Skip to content

Box

A padded block with a background, rounded corners and a shadow.

A box holds anything: text, a form or a small widget.

On a link the whole box is clickable and lifts on hover.

Styles

.outlined swaps the shadow for a border. .rounded and .square change the corners.

Outlined
Rounded
Square

Box or card

A box is one plain block. A card adds header and footer bands and size classes.

Variables

VariableDefault
--i-box-padding1.25rem
--i-box-border-radiusvar(--i-border-radius)
--i-box-color-textvar(--i-color-text)
--i-box-color-backgroundvar(--i-color-background)
--i-box-color-bordervar(--i-color-subtle-border)
--i-box-shadowvar(--i-shadow)
--i-box-hover-shadowLinked box hover and press0 0.5em 1em -0.125em color-mix(in oklab, var(--i-color-text) 10%, transparent), 0 0 0 var(--i-border-width) var(--i-color-link)
--i-box-active-shadowinset 0 0.0625rem 0.125rem color-mix(in oklab, var(--i-color-text) 20%, transparent), 0 0 0 var(--i-border-width) var(--i-color-link)