Skip to content

Instantly share code, notes, and snippets.

@steelywing
Created August 30, 2013 14:22
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 steelywing/6390375 to your computer and use it in GitHub Desktop.
Save steelywing/6390375 to your computer and use it in GitHub Desktop.
css checkbox
input[type="checkbox"].checkbox {
// basic checkbox style
display: none !important;
+ label {
cursor: pointer;
display: inline-block;
}
// lock style
&.lock {
+ label {
padding-left: 48px;
line-height: 48px;
background: url('http://icons.iconarchive.com/icons/deleket/soft-scraps/48/Lock-Unlock-icon.png')
no-repeat center left;
}
&:checked + label {
background-image: url('http://icons.iconarchive.com/icons/deleket/soft-scraps/48/Lock-Lock-icon.png');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment