Spacing Helpers
Spacer is .4rem which is equal to 4px for default.
$spacer: .4rem;
Assign responsive-friendly margin or padding values to an element or a subset of its sides with shorthand classes. Includes support for
individual properties, all properties, and vertical and horizontal properties. Classes are built from a default Sass map ranging from 0rem to 50rem.
Spacing utilities that apply to all breakpoints, from xs to xl, have no breakpoint abbreviation in them. This is because those classes
are applied from min-width: 0 and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.
The classes are named using the format {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.
Where property is one of:
m- for classes that setmarginp- for classes that setpadding
Where sides is one of:
t- for classes that setmargin-toporpadding-topb- for classes that setmargin-bottomorpadding-bottoml- for classes that setmargin-leftorpadding-leftr- for classes that setmargin-rightorpadding-rightx- for classes that set both*-leftand*-righty- for classes that set both*-topand*-bottom- blank - for classes that set a
marginorpaddingon all 4 sides of the element
Where size is one of:
0- for classes that eliminate themarginorpaddingby setting it to01- (by default) for classes that set themarginorpaddingto$spacer * .252- (by default) for classes that set themarginorpaddingto$spacer * .53- (by default) for classes that set themarginorpaddingto$spacer4- (by default) for classes that set themarginorpaddingto$spacer * 1.55- (by default) for classes that set themarginorpaddingto$spacer * 3
(You can add more sizes by adding entries to the $spacers Sass map variable.)
Padding Helpers
p - for classes that set
padding, ranging from p-0 to p-50.
p-0
p-1
p-2
p-3
p-3
p-4
p-5
p-6
p-7
...
Direction Specific - Padding Helpers
pt-12
pr-12
pb-12
pl-12
px-12
py-12
p-12
Responsive - Padding Helpers
p-4
p-sm-6
p-md-8
p-lg-10
p-xl-12
Margin Helpers
m - for classes that set
margin, ranging from m-0 to m-50.
m-0
m-1
m-2
m-3
m-3
m-4
m-5
m-6
m-7
...
Direction Specific - Margin Helpers
mt-12
mr-12
mb-12
ml-12
mx-12
my-12
m-12
Responsive - Margin Helpers
m-4
m-sm-6
m-md-8
m-lg-10
m-xl-12