Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chanified/1b15187d607607290570 to your computer and use it in GitHub Desktop.
Save chanified/1b15187d607607290570 to your computer and use it in GitHub Desktop.
Chanifed Padding and Margin Less Helper Classes
.chanified-size-loop (@i) when (@i >= 0) {
/* Margins */
.p@{i} {
padding:~"@{i}px" !important;
}
.pt@{i} {
padding-top:~"@{i}px" !important;
}
.pr@{i} {
padding-right:~"@{i}px" !important;
}
.pl@{i} {
padding-left:~"@{i}px" !important;
}
.pb@{i} {
padding-bottom:~"@{i}px" !important;
}
/* Margins */
.m@{i} {
margin:~"@{i}px" !important;
}
.mt@{i} {
margin-top:~"@{i}px" !important;
}
.mr@{i} {
margin-right:~"@{i}px" !important;
}
.ml@{i} {
margin-left:~"@{i}px" !important;
}
.mb@{i} {
margin-bottom:~"@{i}px" !important;
}
/* intervals of 5 only (0 through i)*/
.chanified-size-loop(@i - 5);
}
.chanified-size-loop(100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment