diff --git a/scss/_helpers.scss b/scss/_helpers.scss index 4a989f5a5..644b693fb 100644 --- a/scss/_helpers.scss +++ b/scss/_helpers.scss @@ -1,4 +1,5 @@ @import "helpers/clearfix"; +@import "helpers/color-bg"; @import "helpers/colored-links"; @import "helpers/ratio"; @import "helpers/position"; diff --git a/scss/helpers/_color-bg.scss b/scss/helpers/_color-bg.scss new file mode 100644 index 000000000..c1e7dc5b7 --- /dev/null +++ b/scss/helpers/_color-bg.scss @@ -0,0 +1,7 @@ +@each $color, $value in $theme-colors { + $color-rgb: to-rgb($value); + .text-bg-#{$color} { + color: color-contrast($value) !important; // stylelint-disable-line declaration-no-important + background-color: rgba($color-rgb, var(--#{$prefix}bg-opacity, 1)) !important; // stylelint-disable-line declaration-no-important + } +} diff --git a/site/content/docs/5.1/customize/color.md b/site/content/docs/5.1/customize/color.md index e3d895bef..6a16db1ec 100644 --- a/site/content/docs/5.1/customize/color.md +++ b/site/content/docs/5.1/customize/color.md @@ -102,11 +102,11 @@ Colors ending in `--rgb` provide the `red, green, blue` values for use in `rgb() | **Secondary —** For disabled states, dividers, and lighter text. |
Some quick example text to build on the card title and make up the bulk of the card's content.
+Some quick example text to build on the card title and make up the bulk of the card's content.
+