Skip to content

Instantly share code, notes, and snippets.

@hubgit
Last active January 10, 2019 11:18
Show Gist options
  • Save hubgit/6102605 to your computer and use it in GitHub Desktop.
Save hubgit/6102605 to your computer and use it in GitHub Desktop.
Spacing for Bootstrap Glyphicons in buttons
.btn .glyphicon {
margin-right: 4px;
vertical-align: middle;
}
.btn.btn-icon .glyphicon {
margin-right: 0;
}
@Quix0r
Copy link

Quix0r commented Apr 16, 2018

The .glyphicon-folder-open has no spacing to the right (e.g. when you have a link with an icon left and text right). Then you may need this:

a .glyphicon-folder-open {
    margin-right: 2px;
}

Replace a with e.g. .btn when you need to assign it to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment