Skip to content

Instantly share code, notes, and snippets.

@SeanRoberts
Created November 16, 2011 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanRoberts/1370613 to your computer and use it in GitHub Desktop.
Save SeanRoberts/1370613 to your computer and use it in GitHub Desktop.
@mixin button($background_base, $height: 39px, $left-pad: 5, $padding: 15, $background_ext: '.png') {
display: inline-block;
background: image-url('buttons/left_#{$background_base}#{$background_ext}') no-repeat left top;
padding-left: $left-pad + px;
span {
display: block;
background: image-url('buttons/right_#{$background_base}#{$background_ext}') no-repeat right top;
height: $height;
padding-left: $padding - $left-pad + px;
padding-right: $padding + px;
}
&:active {
background: image-url('buttons/left_#{$background_base}_down#{$background_ext}') no-repeat left top;
span {
background: image-url('buttons/right_#{$background_base}_down#{$background_ext}') no-repeat right top;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment