Skip to content

Commit

Permalink
Merge pull request twbs#1 from hamad-almamari/add-negative-margin-spa…
Browse files Browse the repository at this point in the history
…cing

Update _spacing.scss - add negative margin spacing
  • Loading branch information
hamad-almamari committed Feb 6, 2017
2 parents b479efb + b19ee58 commit 9ddf746
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scss/utilities/_spacing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@
#{$prop}-top: $length-y !important;
#{$prop}-bottom: $length-y !important;
}

// add negative margin
@if ($prop == margin ) {
.#{$abbrev}n#{$infix}-#{$size} { #{$prop}: ($length-y * -1 ) ($length-x * -1 ) !important; }
.#{$abbrev}nt#{$infix}-#{$size} { #{$prop}-top: ($length-y * -1 ) !important; }
.#{$abbrev}nr#{$infix}-#{$size} { #{$prop}-right: ($length-x * -1 ) !important; }
.#{$abbrev}nb#{$infix}-#{$size} { #{$prop}-bottom: ($length-y * -1 ) !important; }
.#{$abbrev}nl#{$infix}-#{$size} { #{$prop}-left: ($length-x * -1 ) !important; }
.#{$abbrev}nx#{$infix}-#{$size} {
#{$prop}-right: ($length-x * -1 ) !important;
#{$prop}-left: ($length-x * -1 ) !important;
}
.#{$abbrev}ny#{$infix}-#{$size} {
#{$prop}-top: ($length-y * -1 ) !important;
#{$prop}-bottom: ($length-y * -1 ) !important;
}
}

}
}

Expand Down

0 comments on commit 9ddf746

Please sign in to comment.