Last active
September 11, 2018 01:57
-
-
Save alexrdz/75e44e08cc30a2e7ffff481af2d7ef1a to your computer and use it in GitHub Desktop.
Revisions
-
alex rodriguez renamed this gist
Sep 11, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
alex rodriguez created this gist
Sep 11, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ @mixin utility-generator($prop, $direction, $iterator) { @for $index from 1 through $iterator { @if ($prop == 'padding') { .p#{$direction}-#{$index} { @if ($direction == 'x') { #{$prop}-left: $index * $utility-unit; #{$prop}-right: $index * $utility-unit; } @if ($direction == 'y') { #{$prop}-bottom: $index * $utility-unit; #{$prop}-top: $index * $utility-unit; } @if ($direction == 'l') { #{$prop}-left: $index * $utility-unit; } @if ($direction == 'r') { #{$prop}-right: $index * $utility-unit; } } } @if ($prop == 'margin') { .m#{$direction}-#{$index} { @if ($direction == 'x') { #{$prop}-left: $index * $utility-unit; #{$prop}-right: $index * $utility-unit; } @if ($direction == 'y') { #{$prop}-bottom: $index * $utility-unit; #{$prop}-top: $index * $utility-unit; } @if ($direction == 'l') { #{$prop}-left: $index * $utility-unit; } @if ($direction == 'r') { #{$prop}-right: $index * $utility-unit; } } } } }