The Bootstrap 4 $spacer is a really smart way of using rems of including spacing ulitilies. I love that they added it, but I use needed a few more spacing options than the 5 that are included by default.
Assuming that 1rem = 16px, here are the spacing options this gist creates.
- 0 = 0px
- 1 = 4px
- 2 = 8px
- 3 = 16px
- 4 = 24px
- 5 = 32px
- 6 = 40px
- 7 = 48px
- 8 = 56px
- 9 = 64px
- 10 = 72px
- 11 = 80px
- 12 = 96px
- 13 = 128px
- 14 = 160px
- 15 = 192px
- 16 = 256px
For more information about Boostrap 4 spacing: https://getbootstrap.com/docs/4.0/utilities/spacing/
Include the scss file before your @import of boostrap4 and it will update the sass variables.