Background Repeat

Utilities for controlling the repetition of an element's background image.

Work in progress!

More detailed documentation is coming soon, but in the meantime here's a quick class reference.

Class reference

Class Properties
.bg-repeat background-repeat: repeat;
.bg-no-repeat background-repeat: no-repeat;
.bg-repeat-x background-repeat: repeat-x;
.bg-repeat-y background-repeat: repeat-y;

Customizing

Responsive and State Variants

By default, only responsive variants are generated for background repeat utilities.

You can control which variants are generated for the background repeat utilities by modifying the backgroundRepeat property in the modules section of your Tailwind config file.

For example, this config will also generate hover and focus variants:

{
// ...
modules: {
    // ...
-   backgroundRepeat: ['responsive'],
+   backgroundRepeat: ['responsive', 'hover', 'focus', 'active', 'group-hover'],
}
}

Disabling

If you don't plan to use the background repeat utilities in your project, you can disable them entirely by setting the backgroundRepeat property to false in the modules section of your config file:

{
// ...
modules: {
    // ...
-   backgroundRepeat: ['responsive'],
+   backgroundRepeat: false,
}
}