Skip to content

Instantly share code, notes, and snippets.

@cmawhorter
Created October 25, 2017 19:03
Show Gist options
  • Save cmawhorter/05e75ddaf648dd9d2e19696aca2e5000 to your computer and use it in GitHub Desktop.
Save cmawhorter/05e75ddaf648dd9d2e19696aca2e5000 to your computer and use it in GitHub Desktop.
Margin and padding utility classes
.ma-0,
.my-0,
.mt-0 {
margin-top: 0;
}
.ma-q,
.my-q,
.mt-q {
margin-top: .25rem;
}
.ma-h,
.my-h,
.mt-h {
margin-top: .5rem;
}
.ma-1,
.my-1,
.mt-1 {
margin-top: 1rem;
}
.ma-2,
.my-2,
.mt-2 {
margin-top: 2rem;
}
.ma-3,
.my-3,
.mt-3 {
margin-top: 3rem;
}
.ma-0,
.my-0,
.mb-0 {
margin-bottom: 0;
}
.ma-q,
.my-q,
.mb-q {
margin-bottom: .25rem;
}
.ma-h,
.my-h,
.mb-h {
margin-bottom: .5rem;
}
.ma-1,
.my-1,
.mb-1 {
margin-bottom: 1rem;
}
.ma-2,
.my-2,
.mb-2 {
margin-bottom: 2rem;
}
.ma-3,
.my-3,
.mb-3 {
margin-bottom: 3rem;
}
.ma-0,
.mx-0,
.ml-0 {
margin-left: 0;
}
.ma-q,
.mx-q,
.ml-q {
margin-left: .25rem;
}
.ma-h,
.mx-h,
.ml-h {
margin-left: .5rem;
}
.ma-1,
.mx-1,
.ml-1 {
margin-left: 1rem;
}
.ma-2,
.mx-2,
.ml-2 {
margin-left: 2rem;
}
.ma-3,
.mx-3,
.ml-3 {
margin-left: 3rem;
}
.ma-0,
.mx-0,
.mr-0 {
margin-right: 0;
}
.ma-q,
.mx-q,
.mr-q {
margin-right: .25rem;
}
.ma-h,
.mx-h,
.mr-h {
margin-right: .5rem;
}
.ma-1,
.mx-1,
.mr-1 {
margin-right: 1rem;
}
.ma-2,
.mx-2,
.mr-2 {
margin-right: 2rem;
}
.ma-3,
.mx-3,
.mr-3 {
margin-bottom: 3rem;
}
.pa-0,
.py-0,
.pt-0 {
padding-top: 0;
}
.pa-q,
.py-q,
.pt-q {
padding-top: .25rem;
}
.pa-h,
.py-h,
.pt-h {
padding-top: .5rem;
}
.pa-1,
.py-1,
.pt-1 {
padding-top: 1rem;
}
.pa-2,
.py-2,
.pt-2 {
padding-top: 2rem;
}
.pa-3,
.py-3,
.pt-3 {
padding-top: 3rem;
}
.pa-0,
.py-0,
.pb-0 {
padding-bottom: 0;
}
.pa-q,
.py-q,
.pb-q {
padding-bottom: .25rem;
}
.pa-h,
.py-h,
.pb-h {
padding-bottom: .5rem;
}
.pa-1,
.py-1,
.pb-1 {
padding-bottom: 1rem;
}
.pa-2,
.py-2,
.pb-2 {
padding-bottom: 2rem;
}
.pa-3,
.py-3,
.pb-3 {
padding-bottom: 3rem;
}
.pa-0,
.px-0,
.pl-0 {
padding-left: 0;
}
.pa-q,
.px-q,
.pl-q {
padding-left: .25rem;
}
.pa-h,
.px-h,
.pl-h {
padding-left: .5rem;
}
.pa-1,
.px-1,
.pl-1 {
padding-left: 1rem;
}
.pa-2,
.px-2,
.pl-2 {
padding-left: 2rem;
}
.pa-3,
.px-3,
.pl-3 {
padding-left: 3rem;
}
.pa-0,
.px-0,
.pr-0 {
padding-right: 0;
}
.pa-q,
.px-q,
.pr-q {
padding-right: .25rem;
}
.pa-h,
.px-h,
.pr-h {
padding-right: .5rem;
}
.pa-1,
.px-1,
.pr-1 {
padding-right: 1rem;
}
.pa-2,
.px-2,
.pr-2 {
padding-right: 2rem;
}
.pa-3,
.px-3,
.pr-3 {
padding-bottom: 3rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment