Background Utilities

# Attachment

The background attachment utility controls how a background images behaves on scroll.

ClassProperties
--background-fixedbackground-attachment: fixed;
--background-localbackground-attachment: local;
--background-scrollbackground-attachment: scroll;

# Color

The background color utility controls the background color of an element and contains classes for each color variable along with primary, success, warning, danger, dark, and light. This utility also includes classes for focus and hover states. See colors.

ClassStateProperties
--background-bluebackground-color: @color[blue];
--background-primarybackground-color: @color[blue];
--focus-background-primary:focusbackground-color: @color[blue];
--hover-background-primary:hoverbackground-color: @color[blue];

# Position

The background position utility controls the position of the element's background image.

ClassProperties
--background-bottombackground-position: bottom;
--background-centerbackground-position: center;
--background-leftbackground-position: left;
--background-leftbackground-position: left;
--background-left-bottombackground-position: left bottom;
--background-left-topbackground-position: left top;
--background-rightbackground-position: right;
--background-right-bottombackground-position: right bottom;
--background-right-topbackground-position: right top;
--background-topbackground-position: top;

# Repeat

The background repeat utility controls the repetition of an element's background image.

ClassProperties
--background-repeatbackground-repeat: repeat;
--background-no-repeatbackground-repeat: no-repeat;
--background-repeat-xbackground-repeat: repeat-x;
--background-repeat-ybackground-repeat: repeat-y;
--background-repeat-roundbackground-repeat: round;
--background-repeat-spacebackground-repeat: space;

# Size

The background size utility controls the size of an element's background image.

ClassProperties
--background-autobackground-size: auto;
--background-coverbackground-size: cover;
--background-containbackground-size: contain;