Browse files

Added new fandango spacing mixin

  • Loading branch information...
1 parent 85dd23d commit 6d083291f9499c51fad941ef5039952294f549c1 Chris Buttery committed Jul 23, 2012
Showing with 35 additions and 0 deletions.
  1. +35 −0 stylesheets/stitch/patterns/layout/_spacing.scss
View
35 stylesheets/stitch/patterns/layout/_spacing.scss
@@ -0,0 +1,35 @@
+@mixin spacing-classes($base, $list: small normal medium large){
+
+ @for $i from 1 through length($list) {
+
+ .spacing-#{nth(unquote($list), $i)} {
+ padding: ($base * $i);
+ }
+
+ .spacing-vertical-#{nth(unquote($list), $i)} {
+ padding-top: ($base * $i);
+ padding-bottom: ($base * $i);
+ }
+
+ .spacing-horizontal-#{nth(unquote($list), $i)} {
+ padding-right: ($base * $i);
+ padding-left: ($base * $i);
+ }
+
+ .inset-#{nth(unquote($list), $i)} {
+ margin: ($base * $i);
+ }
+
+ .inset-vertical-#{nth(unquote($list), $i)} {
+ margin-top: ($base * $i);
+ margin-bottom: ($base * $i);
+ }
+
+ .inset-horizontal-#{nth(unquote($list), $i)} {
+ margin-right: ($base * $i);
+ margin-left: ($base * $i);
+ }
+ }
+}
+
+//@include spacing-classes(20px, $list: "big" "bigger" "biggerer" "biggest" );

0 comments on commit 6d08329

Please sign in to comment.