Last active
August 23, 2017 07:34
-
-
Save Security2431/5c76931c5226a17616b6a5f53d971230 to your computer and use it in GitHub Desktop.
radio/checkbox with custom styles
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
<div class="checkbox-btn"> | |
<input class="checkbox-btn__control" type="radio" name="package" id="package-1"> | |
<label class="checkbox-btn__box" for="package-1">btn 1</label> | |
</div> |
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-btn__control { | |
display: none | |
} | |
.checkbox-btn__control:checked+.checkbox-btn__box { | |
background: linear-gradient(to bottom, #ffb619 0%, #efa209 100%) | |
} |
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-btn | |
input#package-1.checkbox-btn__control(type='radio', name='package') | |
label.checkbox-btn__box(for='package-1') btn 1 |
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-btn | |
&__control | |
display: none | |
&:checked | |
&+ .checkbox-btn__box | |
background: linear-gradient(to bottom, #ffb619 0%, #efa209 100%) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment