aboutsummaryrefslogtreecommitdiff
path: root/scss/_root.scss
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2021-05-24 11:56:19 -0700
committerMark Otto <[email protected]>2021-08-03 17:06:06 -0700
commite72916e5b741b07b94b12b3707129e868811bdbb (patch)
treec54431fec249014ab9213b0eba689d77c3643425 /scss/_root.scss
parenta2f92d1aab591c57c6f50905d3cfed587efe914e (diff)
downloadbootstrap-e72916e5b741b07b94b12b3707129e868811bdbb.tar.xz
bootstrap-e72916e5b741b07b94b12b3707129e868811bdbb.zip
Update color and background-color utilities
- Adds new functions to generate additional Sass maps - Adds new root variables for rgb() versions of our theme colors, plus a few extras - Adds ability to change the alpha transparency of text color and background color utilities with new utilities, inline styles, or local CSS var - Updates documentation for color and background-color utilities pages - Deprecates .text-black-50 and .text-white-50 since those (and additional transparency levels) can be generated on the fly Change approach slightly to prevent cascade
Diffstat (limited to 'scss/_root.scss')
-rw-r--r--scss/_root.scss8
1 files changed, 8 insertions, 0 deletions
diff --git a/scss/_root.scss b/scss/_root.scss
index 768d6343f..95c773901 100644
--- a/scss/_root.scss
+++ b/scss/_root.scss
@@ -8,6 +8,14 @@
--#{$variable-prefix}#{$color}: #{$value};
}
+ @each $color, $value in $theme-colors-rgb {
+ --#{$variable-prefix}#{$color}-rgb: #{$value};
+ }
+
+ --#{$variable-prefix}white-rgb: #{to-rgb($white)};
+ --#{$variable-prefix}black-rgb: #{to-rgb($black)};
+ --#{$variable-prefix}body-rgb: #{to-rgb($body-color)};
+
// Use `inspect` for lists so that quoted items keep the quotes.
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
--#{$variable-prefix}font-sans-serif: #{inspect($font-family-sans-serif)};