I need to slowly migrate a legacy codebase to a new design.
The old design uses the default $spacings
provided by Bootstrap 5. The new design has different/additional $spacings
:
$spacers: (
0: 0, //0
1: ($spacer * .25), //4px
2: ($spacer * .5), //8px
3: ($spacer * 0.75), //12px
4: ($spacer * 1), //16px
5: ($spacer * 1.25), //20px
6: ($spacer * 1.75), //28px
7: ($spacer * 2.5), //40px
8: ($spacer * 3.75), //60px
9: ($spacer * 6.25) //100px
);
How can I conditionally set the $spacings
?
Ideally something like this: if the code is inside the CSS class .new-spacings
then use the new spacings, otherwise stick to the old ones.