Created
September 24, 2018 18:39
-
-
Save g-a-v-i-n/403dacf73f008b1382f8c0e974c7c9eb to your computer and use it in GitHub Desktop.
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
/* | |
CHECKBOX | |
*/ | |
.checkbox p { | |
user-select: none; | |
} | |
.checkbox p:first-child { | |
font-weight: 600; | |
margin-bottom: 2rem; | |
} | |
.checkbox p:first-child:hover { | |
cursor: pointer; | |
} | |
.checkbox p:nth-child(2) { | |
font-weight: 400; | |
} | |
.checkbox div { | |
display: flex; | |
flex-direction: column; | |
margin-left: 6rem; | |
flex: 1; | |
} | |
.checkbox input[type='checkbox'] { | |
display: none; | |
} | |
.checkbox label:before { | |
content: ''; | |
position: absolute; | |
width: 4rem; | |
height: 4rem; | |
} | |
.checkbox.isNotChecked label:before { | |
border: 2px solid black; | |
background-color: transparent; | |
} | |
.checkbox.isChecked label:before { | |
background-color: #4330FC; | |
border: 2px solid #4330FC; | |
} | |
.checkbox label { | |
width: 4rem; | |
height: 4rem; | |
margin:0; | |
position: relative; | |
} | |
.checkbox label:hover { | |
cursor: pointer; | |
} | |
.checkbox label input[type='checkbox']+svg { | |
transform: translate(0, 0); | |
opacity: 0; | |
} | |
.checkbox label input[type='checkbox']:checked+svg { | |
opacity: 1; | |
} | |
.checkbox label input[type='checkbox']:checked+span { | |
background-color: #fff; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment