Updated .bg-* and .text-* utilities break when CSS variables are not enabled in v5.1.0
Created by: dgsiegel
In one of my projects I include the needed Bootstrap SCSS files manually and specifically exclude bootstrap/scss/root
, first because I don't rely on most of the CSS variables and secondly because adding all CSS variables increases the CSS file size by about 50-60kb (uncompressed).
With v5.1.0 all .bg-*
and .text-*
utilities break, as the needed CSS variables are missing, e.g.
.text-white {
--bs-text-opacity: 1;
color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; // --bs-white-rgb is not set
}
Is there a simple way to disable CSS variables generation or to reduce the number of CSS variables? The only way forward right now would be to revert the utility sets back to $theme-colors
, but that still leaves an additional --bs-text-opacity: 1;
and does not take care of --bs-body-color
and the like:
$utilities-text-colors: $theme-colors;
$utilities-bg-colors: $theme-colors;