Skip to main content

Background Origin

Utilities for controlling the origin of an element's background.

CSS Property:background-origin
Classes:3

Background Origin Classes

ClassCSS
bg-origin-borderbackground-origin: border-box;
bg-origin-paddingbackground-origin: padding-box;
bg-origin-contentbackground-origin: content-box;

Arbitrary Values

You can use arbitrary values with square bracket notation when you need a specific value not included in the default scale.

[background-origin:value]

Responsive Variants

Apply background origin utilities at specific breakpoints using responsive prefixes.

BreakpointPrefixExample
640px+sm:sm:bg-origin-border
768px+md:md:bg-origin-border
1024px+lg:lg:bg-origin-border
1280px+xl:xl:bg-origin-border
1536px+2xl:2xl:bg-origin-border