Permalink
Browse files

Updated spacing classes so you can now have pad-small-medium which wo…

…uld render padding-top: 10px; padding-right: 30px; padding-bottom: 10px; padding-left: 30px;

TAKE THAT, Nicolas Gallagher @necolas
  • Loading branch information...
1 parent 771895e commit f63c560826c3ff769d66139ccf32bd81d8306ce9 Chris Buttery committed Oct 5, 2012
Showing with 25 additions and 0 deletions.
  1. +25 −0 stylesheets/stitch/patterns/layout/_spacing.scss
@@ -157,6 +157,31 @@
margin-right: (-($base * $i));
margin-left: (-($base * $j));
}
+
+ // Now you can have pad-normal-small,
+ // which renders
+ // {padding-top: 20px; padding-right: 10px; padding-bottom: 20px; padding-left: 10px;}
+
+ .pad-#{nth(unquote($list), $i)}-#{nth(unquote($list), ($j))} {
+ padding-top: ($base * $i);
+ padding-right: ($base * $j);
+ padding-bottom: ($base * $i);
+ padding-left: ($base * $j);
+ }
+
+ .inset-#{nth(unquote($list), $i)}-#{nth(unquote($list), ($j))} {
+ margin-top: ($base * $i);
+ margin-right: ($base * $j);
+ margin-bottom: ($base * $i);
+ margin-left: ($base * $j);
+ }
+
+ .offset-#{nth(unquote($list), $i)}-#{nth(unquote($list), ($j))} {
+ margin-top: (-($base * $i));
+ margin-right: (-($base * $j));
+ margin-bottom: (-($base * $i));
+ margin-left: (-($base * $j));
+ }
}
}
}

0 comments on commit f63c560

Please sign in to comment.