Background Origin

Controls background positioning relative to borders, padding, and content.

ClassStyle
bo-bbbackground-origin: border-box
bo-cbbackground-origin: content-box
bo-pbbackground-origin: padding-box

Padding Box

Initial value

The background positioning area extends to the outer edge of the padding, but does not include the border.

<div class="b-3 b-d bc-pb bo-pb bc-indigo-4 bg-indigo d-20 p-2 rad-1"></div>

Border Box

The background positioning area includes the border area.

<div class="b-3 b-d bc-bb bo-bb bc-indigo-4 bg-indigo d-20 p-2 rad-1"></div>

Content Box

The background positioning area is confined to the content area, excluding padding and borders.

<div class="b-3 b-d bc-cb bo-cb bc-indigo-4 bg-indigo d-20 p-2 rad-1"></div>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Using media queries

You can combine responsive breakpoints like sm:bo-*, md:bo-*, lg:bo-*, and xxl:bo-* to allow targeting specific utilities in different viewports.

Using hover states

Alternatively, you can apply :hover by using h:bo-* utility to override elements and change their values when hovering over them.