Background image

Utilities for applying the background images and gradients set in your theme settings.

On this page
ClassProperties
.bg-homebackground-image: var(--bg-image-home);
.bg-ctabackground: var(--bg-image-cta);
.bg-heroThe hero gradient, using the Hero background gradient setting
.bg-hero-linearbackground: linear-gradient(var(--bg-color-hero-rotation), var(--bg-color-hero), var(--bg-color-hero-secondary));
.bg-hero-radialbackground: radial-gradient(var(--bg-color-hero), var(--bg-color-hero-secondary));
.bg-hero-conicbackground: conic-gradient(var(--bg-color-hero), var(--bg-color-hero-secondary));
.bg-hero-gradientSoft glows of both hero colors, layered over the element with ::before and ::after

Usage

Theme images

Use .bg-home to apply the Hero image theme setting as a background image, and .bg-cta to apply the CTA image setting used by the request call-to-action. Combine them with the background size and background position utilities to control how the image is displayed.

<div class="bg-home bg-cover bg-center">...</div>

Hero gradients

Use .bg-hero-linear, .bg-hero-radial or .bg-hero-conic to apply a gradient between the Hero background color 1 and Hero background color 2 theme settings, or .bg-hero to use the type of gradient chosen in the Hero background gradient setting.

.bg-hero-gradient adds two soft glows of the hero colors over an element, which should have position: relative (for example, with the .relative utility).

<div class="bg-hero-linear"></div>
<div class="bg-hero-radial"></div>
<div class="bg-hero-conic"></div>

Variants

No responsive or hover-state variants are generated for background image utilities.

Questions or feedback about this article? Let us know