Backgrounds

background-size to Tailwind

Three keywords map to bg-auto, bg-cover and bg-contain.

The 3 mappings below are read straight out of Tailwind v4.3.3, not maintained by hand, so this is what the converter will actually produce for background-size.

background-size values and their classes

CSSTailwind
background-size: auto;bg-auto
background-size: contain;bg-contain
background-size: cover;bg-cover

Other backgrounds properties

Converting a whole stylesheet?

Paste it into the converter and get every rule at once, shorthands expanded, media queries turned into breakpoint variants, and the parts that have no Tailwind equivalent flagged rather than dropped.

Open the converter