Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename lib, reorganize css, update readme license
- Loading branch information
Showing
7 changed files
with
155 additions
and
66 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,88 @@ | ||
awesome-bootstrap-checkbox | ||
Awesome Bootstrap Checkbox | ||
========================== | ||
|
||
Font Awesome Bootstrap Checkboxes & Radios. Pure css way to make inputs look prettier. | ||
Font Awesome Bootstrap Checkboxes & Radios plugin. Pure css way to make inputs look prettier. **No javascript**! | ||
|
||
**[Demo](#)** | ||
|
||
Use | ||
------------ | ||
|
||
First just include **awesome-bootstrap-checkbox.css** somewhere in your html. Or **awesome-bootstrap-checkbox.scss** if you use sass. | ||
Next everything is based on code convention. Here is checkbox markup from Bootstrap site: | ||
|
||
<form role="form"> | ||
... | ||
<div class="checkbox"> | ||
<label> | ||
<input type="checkbox"> Check me out | ||
</label> | ||
</div> | ||
... | ||
</form> | ||
|
||
We have to alter it a bit: | ||
|
||
<form role="form"> | ||
... | ||
<div class="checkbox"> | ||
<input type="checkbox" id="checkbox1"> | ||
<label for="checkbox1"> | ||
Check me out | ||
</label> | ||
</div> | ||
... | ||
</form> | ||
|
||
That's it. It will work. But it **will not** work if you nest input inside label or put label before input. | ||
|
||
Radios | ||
------------ | ||
|
||
It's the same for radios. Markup has to be the following: | ||
|
||
<form role="form"> | ||
... | ||
<div class="radio"> | ||
<input type="radio" name="radio2" id="radio3" value="option1"> | ||
<label for="radio3"> | ||
One | ||
</label> | ||
</div> | ||
<div class="radio"> | ||
<input type="radio" name="radio2" id="radio4" value="option2" checked> | ||
<label for="radio4"> | ||
Two | ||
</label> | ||
</div> | ||
... | ||
</form> | ||
|
||
Brand Colors | ||
------------ | ||
|
||
You may use `checkbox-primary`, `checkbox-danger`, `radio-info`, etc to style checkboxes and radios with brand bootstrap colors. | ||
|
||
`checkbox-circle` is for rounded checkboxes. | ||
|
||
Glyphicons way (Opt-out Font Awesome) | ||
------------ | ||
|
||
If you want to use glyphicons instead of font-awesome then override `.checkbox` class: | ||
|
||
.checkbox input[type=checkbox]:checked + label:after { | ||
font-family: 'Glyphicons Halflings'; | ||
content: "\e013"; | ||
} | ||
.checkbox label:after { | ||
padding-left: 4px; | ||
padding-top: 2px; | ||
font-size: 9px; | ||
} | ||
|
||
Credits | ||
------------ | ||
|
||
Based on [Official Bootstrap Sass port](https://github.com/twbs/bootstrap-sass) and awesome [Font Awesome](https://github.com/FortAwesome/Font-Awesome). | ||
|
||
Inspired by [Web Arch Template](http://www.revox.io/webarchv2/form_elements.html) |
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
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
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
Oops, something went wrong.