Skip to content

Instantly share code, notes, and snippets.

@gladchinda
Last active April 1, 2019 09:54
Show Gist options
  • Save gladchinda/bddadb30abd83a6b68a2cd27877cafa8 to your computer and use it in GitHub Desktop.
Save gladchinda/bddadb30abd83a6b68a2cd27877cafa8 to your computer and use it in GitHub Desktop.
/* Styles for the hover state of the custom checkbox */
input[type='checkbox'].check-custom:hover ~ .check-toggle {
border-color: #4a4a4a;
}
/* Styles for the focus state of the custom checkbox */
input[type='checkbox'].check-custom:focus ~ .check-toggle {
border-color: #b0d5ff;
box-shadow: 0 0 0 2px rgba(23, 133, 255, 0.25);
}
/* Styles for the checked state of the custom checkbox */
input[type='checkbox'].check-custom:checked ~ .check-toggle {
border-color: #1785ff;
background: #1785ff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSIyMCA2IDkgMTcgNCAxMiI+PC9wb2x5bGluZT48L3N2Zz4=) center no-repeat;
background-size: 75%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment