You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and all the color classes gets generated properly.
I've also looked at this documentation and it works well as well, but the problem with this is that this should only be used when you have some color for which you only need the background and text classes but not the buttons and other things. Also, this approach will not generate the rgb values. So, all the classes will have --bs-bg-opacity: 1 which will remain unused.
The text was updated successfully, but these errors were encountered:
tovutifunk
changed the title
I think the method mentioned by @nsmeele works great.
Custom theme colors map-loop to Buttons/Text Color/Bg Color removing out-the-box Bootstrap classes
Oct 14, 2021
Last two lines remove text-white text-black bg-body:
$utilities-text-colors: map-loop($utilities-colors, rgba-css-var, "$key", "text");
$utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, "$key", "bg");
How are we able to create map loops with our custom colors and avoid out of the box Bootstrap 5 classes from being removed based on the code above?
I thought the method mentioned by @nsmeele worked great.
That after:
we also need to add these 4 lines:
and all the color classes gets generated properly.
I've also looked at this documentation and it works well as well, but the problem with this is that this should only be used when you have some color for which you only need the background and text classes but not the buttons and other things. Also, this approach will not generate the
rgb
values. So, all the classes will have--bs-bg-opacity: 1
which will remain unused.Originally posted by @isaumya in #34734 (comment)
The text was updated successfully, but these errors were encountered: