Skip to content

Commit

Permalink
Updated spacing classes so you can now have pad-small-medium which wo…
Browse files Browse the repository at this point in the history
…uld render padding-top: 10px; padding-right: 30px; padding-bottom: 10px; padding-left: 30px;

TAKE THAT, Nicolas Gallagher @necolas
  • Loading branch information
Chris Buttery authored and Chris Buttery committed Oct 5, 2012
1 parent 771895e commit f63c560
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions stylesheets/stitch/patterns/layout/_spacing.scss
Expand Up @@ -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));
}
}
}
}
Expand Down

0 comments on commit f63c560

Please sign in to comment.