Skip to content

Instantly share code, notes, and snippets.

@emolr
Last active August 29, 2015 13:57
Show Gist options
  • Save emolr/9546992 to your computer and use it in GitHub Desktop.
Save emolr/9546992 to your computer and use it in GitHub Desktop.
// Use of glyphicon inside buttons
$btn-icon-space: 5px !default;
.btn {
$icon: glyphicon; // variable for icon class name
.#{$icon} {
vertical-align: middle;
@if $icon == glyphicon {
top: -1px; // hack to center vertical
} @else {
top: 0;
}
&.#{$icon}-left {
padding-right: $btn-icon-space;
}
&.#{$icon}-right {
padding-left: $btn-icon-space;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment