Note: the scss need Compass to compile correctly
Demo: Codepen
The utilisation is simple just use the .flat-custom
class on any checkbox or radio.
<input type="checkbox" class="flat-custom" id="flat_check"/>
<label for="flat_check">I'm a checkbox label</label>
or
<input type="radio" class="flat-custom" id="flat_radio1" name="flat_radio"/>
<label for="flat_radio1"></label>
<input type="radio" class="flat-custom" id="flat_radio2" name="flat_radio"/>
<label for="flat_radio2"></label>
Has these styles are basically hiding the <input type="checkbox">
or the <input type="radio">
and styling the <label>
. The label must follow the input for the styles to apply correctly
####Inverted
<input type="checkbox" class="flat-custom inverted" id="checkbox_inverted" checked />
<label for="checkbox_inverted">I'm a label aligned right</label>
####Small
<input type="checkbox" class="flat-custom small" id="checkbox_small" checked />
<label for="checkbox_small">I'm small</label>
####Large
<input type="checkbox" class="flat-custom large" id="checkbox_large" checked />
<label for="checkbox_large">I'm large</label>
####Colored with the @mixin
$color-name : 'sunflower';
$color-value : #F1C40F;
@include flat-checkbox-radio( $color-name , $color-value );
<div class="sunflower">
<input type="radio" class="flat-custom" id="radio_colored_1" checked />
<label for="radio_colored_1">I'm a label</label>
<input type="radio" class="flat-custom" id="radio_colored_2" checked />
<label for="radio_colored_2">I'm a label</label>
</div>
####or
<input type="checkbox" class="flat-custom sunflower" id="radio_colored" checked />
<label for="radio_colored">I'm a label</label>