Created
April 11, 2014 14:58
-
-
Save Webklex/10475663 to your computer and use it in GitHub Desktop.
Radio/Checkboxes HACK
This file contains hidden or 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
/******************************************************************************* | |
* Radio/Checkboxes HACK | |
*******************************************************************************/ | |
input[type=checkbox]:not(old), | |
input[type=radio ]:not(old){ | |
width : 2em; | |
margin : 0; | |
padding : 0; | |
font-size : 1em; | |
opacity : 0; | |
} | |
input[type=checkbox]:not(old) + label, | |
input[type=radio ]:not(old) + label{ | |
display : inline-block; | |
margin-left : -2em; | |
line-height : 1.5em; | |
} | |
input[type=checkbox]:not(old) + label > span, | |
input[type=radio ]:not(old) + label > span{ | |
display : inline-block; | |
width : 0.875em; | |
height : 0.875em; | |
margin : 0.25em 0.5em 0.25em 0.25em; | |
border : 2px solid #333; | |
border-radius : 0.875em; | |
background : rgb(224,224,224); | |
vertical-align : bottom; | |
} | |
input[type=checkbox]:not(old):checked + label > span:before{ | |
content : ''; | |
display : block; | |
width : 0.875em; | |
height : 0.875em; | |
border : 0.0625em solid #333; | |
border-radius : 0.875em; | |
background : #333; | |
margin: -0.125em 0 0 -0.125em; | |
} | |
input[type=radio]:not(old):checked + label > span > span{ | |
display : block; | |
width : 0.875em; | |
height : 0.875em; | |
margin : 0.125em; | |
border : 0.0625em solid #333; | |
border-radius : 0.875em; | |
background : #333; | |
margin: -0.125em 0 0 -0.125em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment