]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
`.text-bg-*` helpers now use theme CSS variables (#38772)
authorcameronhollis <102624514+cameronhollis@users.noreply.github.com>
Mon, 17 Jul 2023 03:41:29 +0000 (23:41 -0400)
committerGitHub <noreply@github.com>
Mon, 17 Jul 2023 03:41:29 +0000 (20:41 -0700)
* #38769 text-bg-primary now respects --bs-primary color

* Revert "#38769 text-bg-primary now respects --bs-primary color"

This reverts commit a4db90ff70b0957755ae4870281c318668307c65.

* #38769 updated scss file to respect --bs-primary color with text-bg-primary class

---------

Co-authored-by: Cameron Hollis <cameronjhollis@gmail.com>
scss/helpers/_color-bg.scss

index c00acde5c07d48cabf79d8583c1fbb4f77b1df32..1a3a4cffd656114d06935d50c51dbda750606b50 100644 (file)
@@ -1,8 +1,7 @@
 // All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
 @each $color, $value in $theme-colors {
-  $color-rgb: to-rgb($value);
   .text-bg-#{$color} {
     color: color-contrast($value) if($enable-important-utilities, !important, null);
-    background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
+    background-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
   }
 }