Backgrounds
Set the background color with Background(Color), then control how a background image is attached, clipped, repeated and sized.
Background color
Background(Color) sets
background-color from the palette or an arbitrary
Color. See Colors
for the full palette.
Attachment
| Utility | Generated CSS |
|---|---|
BgAttachmentFixed() |
background-attachment: fixed |
BgAttachmentLocal() |
background-attachment: local |
BgAttachmentScroll() |
background-attachment: scroll |
Clip and origin
| Utility | Generated CSS |
|---|---|
BgClipBorder() |
background-clip: border-box |
BgClipPadding() |
background-clip: padding-box |
BgClipContent() |
background-clip: content-box |
BgClipText() |
background-clip: text |
BgOriginBorder() |
background-origin: border-box |
BgOriginPadding() |
background-origin: padding-box |
BgOriginContent() |
background-origin: content-box |
Repeat and size
| Utility | Generated CSS |
|---|---|
BgRepeat() |
background-repeat: repeat |
BgRepeatX() |
background-repeat: repeat-x |
BgRepeatY() |
background-repeat: repeat-y |
BgNoRepeat() |
background-repeat: no-repeat |
BgRepeatRound() |
background-repeat: round |
BgRepeatSpace() |
background-repeat: space |
BgCover() |
background-size: cover |
BgContain() |
background-size: contain |
BgAuto() |
background-size: auto |
BgNone() |
background-image: none |
BgNone() clears the background image. The other
helpers carry the image, so pair them with an image set through plain CSS or
Arbitrary.