Skip to content

Instantly share code, notes, and snippets.

@mybuddymichael
Created January 22, 2012 00:33
Show Gist options
  • Save mybuddymichael/1654785 to your computer and use it in GitHub Desktop.
Save mybuddymichael/1654785 to your computer and use it in GitHub Desktop.
My common SCSS mixins
@mixin link($px: 2, $style: solid, $color: white) {
text-decoration: none;
border-bottom: $px*1px $style $color;
}
@mixin font-size($font-size: 16) {
font-size: $font-size*1px;
font-size: $font-size/16*1rem;
}
@mixin line-height($line-height: 20) {
line-height: $line-height*1px;
line-height: $line-height/16*1rem;
}
@mixin margin($t, $r, $b, $l, $container) {
margin: percentage($t/$container) percentage($r/$container)
percentage($b/$container) percentage($l/$container);
}
@mixin padding($t, $r, $b, $l, $container) {
padding: percentage($t/$container) percentage($r/$container)
percentage($b/$container) percentage($l/$container);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment