Skip to main content
MybringDesign System

Margin

Spacing around elements

Assemble combinations of these spacing utilities to add or remove space. You can start with medium — and then increase or decrease as needed. No more magic numbers and pixel nudging, all the elements on your page will line up when you stick to this ratio based scale.

ClassDeclaration
ma0margin: 0;
maxsmargin: .25rem;
masmargin: .5rem;
mammargin: 1rem;
malmargin: 2rem;
maxlmargin: 4rem;
mh0margin-left: 0; margin-right: 0;
mhxsmargin-left: .25rem; margin-right: .25rem;
mhsmargin-left: .5rem; margin-right: .5rem;
mhmmargin-left: 1rem; margin-right: 1rem;
mhlmargin-left: 2rem; margin-right: 2rem;
mhxlmargin-left: 4rem; margin-right: 4rem;
mv0margin-top: 0; margin-bottom: 0;
mvxsmargin-top: .25rem; margin-bottom: .25rem;
mvsmargin-top: .5rem; margin-bottom: .5rem;
mvmmargin-top: 1rem; margin-bottom: 1rem;
mvlmargin-top: 2rem; margin-bottom: 2rem;
mvxlmargin-top: 4rem; margin-bottom: 4rem;
ml0margin-left: 0;
mlxsmargin-left: .25rem;
mlsmargin-left: .5rem;
mlmmargin-left: 1rem;
mllmargin-left: 2rem;
mlxlmargin-left: 4rem;
mr0margin-right: 0;
mrxsmargin-right: .25rem;
mrsmargin-right: .5rem;
mrmmargin-right: 1rem;
mrlmargin-right: 2rem;
mrxlmargin-right: 4rem;
mb0margin-bottom: 0;
mbxsmargin-bottom: .25rem;
mbsmargin-bottom: .5rem;
mbmmargin-bottom: 1rem;
mblmargin-bottom: 2rem;
mbxlmargin-bottom: 4rem;
mt0margin-top: 0;
mtxsmargin-top: .25rem;
mtsmargin-top: .5rem;
mtmmargin-top: 1rem;
mtlmargin-top: 2rem;
mtxlmargin-top: 4rem;
m-automargin-left: auto; margin-right: auto;
mt-automargin-top: auto;
mr-automargin-right: auto;
mb-automargin-bottom: auto;
ml-automargin-left: auto;
m
margin
a
all
h
horizontal
v
vertical
t
top
r
right
b
bottom
l
left

Learn more about spacing