2018 Bootstrap 4 Update
Bootable boot file 4 has changed since the initial response. Now the syntax is simple:
- fields: m {sides} - {size}
- padding: p {sides} - {size}
<strong> Examples ..
mb-2 = edge of the lower block with an interval of 2 m-0 = borderless
pt-3 = fill the top 3 interval blocks
p-1 = fill all sides 1 unit of distance
There are now 6 sizes (0-6) that are part of the standard .5rem spacer unit. In addition, the x-axis (left / right) and y-axis (upper / lower) utils are added:
my-2 = edge of the upper and lower 2 interval blocks
mx-0 = no fields left and right
px-3 = fill left and right 3 interval blocks -
And now interval utilities are reacting. The smallest breakpoint xs implied when a breakpoint is not used.
- fields: m {sides} - {breakpoint} - {size}
- padding: p {sides} - {breakpoint} - {size}
mt-md-2 = extreme location of two intervals, on md (and up)
py-sm-0 = no padding on top and bottom, on sm (and up)
Bootstrap 4 Spacing Utilities Demo
source share