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
All our custom variables and Bootstrap variable overrides could be stored in a single _variables.scss file, which preceded the importing of Bootstrap's _variables.scss file.
Now, in Bootstrap 5, we have to merge our custom variables into the map after Bootstrap's _variables.scss file has been imported, which ends up looking something like this:
We end up needing to create two variables files; one for before and one for after we import Bootstrap's variables file. Is there a reason why Bootstrap 5 has switched to this arguably less elegant approach?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This has been discussed previously in issue #31089 (and maybe elsewhere).
In Bootstrap 4, we could add additional variables to a map like this:
All our custom variables and Bootstrap variable overrides could be stored in a single _variables.scss file, which preceded the importing of Bootstrap's _variables.scss file.
Now, in Bootstrap 5, we have to merge our custom variables into the map after Bootstrap's _variables.scss file has been imported, which ends up looking something like this:
or, more realistically:
We end up needing to create two variables files; one for before and one for after we import Bootstrap's variables file. Is there a reason why Bootstrap 5 has switched to this arguably less elegant approach?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions