π¨ Background
The background foundation allows you to apply consistent background colors across components using a predefined map of color tokens.
It uses a loop to generate utility classes following the naming convention:
.f--background-{variation}
π This loop will iterate over a map like this:
Section titled βπ This loop will iterate over a map like this:β$colorbg-options: ( a: $color-a, b: $color-b, c: $color-c,);
π§ How to use it
Section titled βπ§ How to use itβIn HTML
<div class="f--background-a">Background A</div><div class="f--background-b">Background B</div>
In SCSS
- Extending the generated foundation class β preferred method:
.c--component-a { @extend .f--background-a;}
- Using the map-get directly:
.c--component-a { background: map-get($colorbg-options, a);}