-
-
Save seyDoggy/4da0454f7cddf287e852 to your computer and use it in GitHub Desktop.
Font Awesome over rides for radio buttons and checkbox's
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
/* So first step is to hide your actual radio button because the browser won't let you hide the real thing */ | |
input[type="radio"], input[type="checkbox"] { | |
display:none; | |
} | |
/* Next specify a font size, 8px is comes out about the same size as a regular radio button */ | |
.radio-stack{ | |
font-size: 8px; | |
} |
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
<label for="radioForAwesome"> | |
<input type="radio" ng-model="radioAwesome" name="radio_for_awesome" id="radioForAwesome" value="awesome"> | |
<span class="fa-stack radio-stack fa-lg"> | |
<i class="fa fa-circle-o fa-stack-2x" ng-hide="radioAwesome === 'awesome"></i> | |
<i class="fa fa-dot-circle-o fa-stack-2x" ng-show="radioAwesome === 'awesome'"></i> | |
</span> Radio awesomeness | |
</label> | |
<label for="radioForNot"> | |
<input type="radio" ng-model="radioAwesome" name="radio_for_awesome" id="radioForNot" value="not"> | |
<span class="fa-stack radio-stack fa-lg"> | |
<i class="fa fa-circle-o fa-stack-2x" ng-hide="radioAwesome === 'not"></i> | |
<i class="fa fa-dot-circle-o fa-stack-2x" ng-show="radioAwesome === 'not'"></i> | |
</span> Radio not | |
</label> | |
<label for="checkboxForTruth"> | |
<input type="checkbox" ng-model="somethingTrue" name="something_true" id="checkboxForTruth" value="true"> | |
<span class="fa-stack radio-stack fa-lg"> | |
<i class="fa fa-square-o fa-stack-2x" ng-hide="somethingTrue"></i> | |
<i class="fa fa-check-square-o fa-stack-2x" ng-show="somethingTrue"></i> | |
</span> Checkbox for truth | |
</label> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment