Skip to content

Instantly share code, notes, and snippets.

@erikwiffin
Created December 14, 2016 23:02
Show Gist options
  • Save erikwiffin/441972285ae56c979af97c2b0a8e4c42 to your computer and use it in GitHub Desktop.
Save erikwiffin/441972285ae56c979af97c2b0a8e4c42 to your computer and use it in GitHub Desktop.
Replace native checkboxes with their glyphicon equivalent
input[type="checkbox"].glyphbox {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
line-height: 0;
outline: none;
}
input[type="checkbox"].glyphbox:before {
font-family: 'Glyphicons Halflings';
font-size: 18px;
content: "\e157";
}
input[type="checkbox"][disabled].glyphbox:before {
color: #999;
}
input[type="checkbox"].glyphbox:checked:before {
content: "\e067";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment