Chi Documentation

Color

Use shorthand color utility classes to quickly apply or remove a background color.

Notation

Color utility classes can be defined using the format -bg-{breakpoint}--{value}. Breakpoints supported are sm, md, lg, and xl.

Target all breakpoints

Color utility classes with no breakpoint defined apply to all screen sizes.

Color Class
Value
Result
-bg--nonebackground: none;
-bg--brandbackground-color:#4E8003
-bg--whitebackground-color:#FFFFFF
-bg--blackbackground-color:#000000
-bg--grey-10background-color:#F8F8F8
-bg--grey-20background-color:#EEEEEE
-bg--green-40background-color:#8CC63F
-bg--successbackground-color:#4E8003
-bg--warningbackground-color:#A66102
-bg--dangerbackground-color:#DE1B21
-bg--infobackground-color:#2973E3

Target specific breakpoints

To target a specific breakpoint, add the breakpoint abbreviation to the class.

Color Class
Value
-bg-sm--noneVisible only from sm
-bg-sm--brandVisible only from sm
-bg-sm--whiteVisible only from sm
-bg-sm--blackVisible only from sm
-bg-sm--grey-10Visible only from sm
-bg-sm--grey-20Visible only from sm
-bg-sm--green-40Visible only from sm
-bg-sm--successVisible only from sm
-bg-sm--warningVisible only from sm
-bg-sm--dangerVisible only from sm
-bg-sm--infoVisible only from sm
-bg-md--noneVisible only from md
-bg-md--brandVisible only from md
-bg-md--whiteVisible only from md
-bg-md--blackVisible only from md
-bg-md--grey-10Visible only from md
-bg-md--grey-20Visible only from md
-bg-md--green-40Visible only from md
-bg-md--successVisible only from md
-bg-md--warningVisible only from md
-bg-md--dangerVisible only from md
-bg-md--infoVisible only from md
-bg-lg--noneVisible only from lg
-bg-lg--brandVisible only from lg
-bg-lg--whiteVisible only from lg
-bg-lg--blackVisible only from lg
-bg-lg--grey-10Visible only from lg
-bg-lg--grey-20Visible only from lg
-bg-lg--green-40Visible only from lg
-bg-lg--successVisible only from lg
-bg-lg--warningVisible only from lg
-bg-lg--dangerVisible only from lg
-bg-lg--infoVisible only from lg
-bg-xl--noneVisible only from xl
-bg-xl--brandVisible only from xl
-bg-xl--whiteVisible only from xl
-bg-xl--blackVisible only from xl
-bg-xl--grey-10Visible only from xl
-bg-xl--grey-20Visible only from xl
-bg-xl--green-40Visible only from xl
-bg-xl--successVisible only from xl
-bg-xl--warningVisible only from xl
-bg-xl--dangerVisible only from xl
-bg-xl--infoVisible only from xl

Examples

-bg--success
-bg-sm--danger
-bg-md--warning
-bg-lg--info
-bg-xl--brand
-bg--none
<!-- background-color success on all breakpoints -->
<div class="-bg--success"></div>
<!-- background-color danger from sm -->
<div class="-bg-sm--danger"></div>
<!-- background-color warning from md -->
<div class="-bg-md--warning"></div>
<!-- background-color info from lg -->
<div class="-bg-lg--info"></div>
<!-- background-color brand from xl -->
<div class="-bg-xl--brand"></div>
<!-- background none on all breakpoints -->
<div class="-bg--none"></div>