Created
May 27, 2016 10:01
-
-
Save jonathanpath/4e3e7165c150e9a0a34d784182392cbc to your computer and use it in GitHub Desktop.
Simple Custom Checkbox in Sass + Glyphicons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==|==================== | |
Module/Custom Checkbox | |
======================= */ | |
.customcheckbox { | |
display: block; | |
position: relative; | |
cursor: pointer; | |
font-weight: 300; | |
span { | |
display: block; | |
padding-left: 35px; | |
&:before { | |
content: ''; | |
position: absolute; | |
left: 0; | |
top: 10px; | |
width: 20px; | |
height: 20px; | |
border: solid 1px #bbb; | |
border-radius: 50%; | |
background-color: #eee; | |
} | |
} | |
input { | |
display: none; | |
&:checked { | |
+ span { | |
color: #000; | |
&:after { | |
content: "\e013"; | |
position: absolute; | |
left: 2px; | |
top: 7px; | |
font-size: 20px; | |
color: $green; | |
display: inline-block; | |
font-family: 'Glyphicons Halflings'; | |
font-style: normal; | |
font-weight: 400; | |
line-height: 1; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
&:before { | |
border-color: $green; | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment