-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$theme-colors doesnt seem to be populating to components in v5.0.0-beta2 #33335
Comments
Same happens to me with 5.0.0-beta1 and 5.0.0-beta2. I tried the following:
That doesnt work, but the following does:
|
Yes, this is a limitation of Sass and us using reassigned variables. To do it right, you have to override the variables first. Our docs suggest putting it after the functions, variables, and mixins because that allows you to use our variables—or at least, it should allow it. Anything that's reassigned (e.g., Duplicate of #33070. |
Oh no :( it's interesting that some of the things work ie buttons tho (considering that it's a limitation of sass). Moving custom variables before the bootstrap vars will introduce some issues tho unless we duplicate just about all the vars in our custom ones. As in some of the custom vars need to use functions / utils that rely on other vars being set. And duplicating the entire vars file over and removing !default to everything would make bs not upgradeable at all and just a pain. Edit: just went on an interesting journey following the duplicate thread and posts around it. Variables was what made me fall in love with bootstrap to start with. Careful of making the library Soo "clever" it becomes "dumb". Going to see if I can just duplicate the variables file and find and replace all |
at this point i think its easier to just not use bootstrap. for anyone else wanting to get this solved.. duplicating the variables file and then making the changes to "your" variables file is about the only option ive found to get this to work. its a HUGE pain. you cant just do "overrides" any more and the variables file is 1357 lines long. (also remember to find and replace remove would suggest the devs look into this. thanks for all the hard work but these changes just ruin the plot. howcome it worked in 4 then? |
META
Windows 10 (latest)
firefox / chrome
bootstrap installed with npm
"dependencies": { "bootstrap": "5.0.0-beta2"}
BUG
when changing the $theme-colors map it doesnt seem to impact all the compoenents.
not totaly sure how to "show" it being broken other than the jsfiddlefollowing.
https://jsfiddle.net/yLejvkw0/
the alerts and buttons seem to map correctly but the others not
EXPECTED BEHAVIOR
alerts: expected
badges: to only have the primary and secondary set (but since badges relies on bg-* this applies to the bg-* part)
buttons: expected
tables: to only have the primary and secondary set, the rest shouldnt be set, and also the colours are wrong
backgrounds: same as tables above
this is the first time im finding this issue tho so it might just be with my test case and application (or i broke something some how but i tried doing a "clean" setup for it)
a "smaller" bootstrap file.
my gulp task (so nothing super special)
The text was updated successfully, but these errors were encountered: