In Bootstrap, we have default spacers defined, like following,
$spacers: (
0: 0,
1: ($spacer * .25), // 4px
2: ($spacer * .5), // 8px
3: $spacer, // 16px
4: ($spacer * 1.5), // 24px
5: ($spacer * 2), // 32px
6: ($spacer * 3) // 48px
);
What if we want a spacer for 20px? Something between spacer 3 and 4. How can we achieve that? Do we have to add it as,
7: ($spacer * 1.25)
OR is there another way?
I tried adding something like below,
3.5: ($spacer * 1.25), // 20px
– this throwed error and 3.5 is not allowed.
OR something like this,
3_5: ($spacer * 1.25), // 20px
But would like to know if there any other ways to achieve this.
Collab Werks is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.