@@ -13,60 +13,65 @@ We have transferred Awesome Bootstrap Checkbox to a new location under our organ
13
13
redirects from old urls, we strongly recommend updating any existing local clones to point to the new repository URL. You can
14
14
do this by using ` git remote ` on the command line:
15
15
16
- git remote set-url origin https://github.com/flatlogic/awesome-bootstrap-checkbox.git
16
+ ```` bash
17
+ git remote set-url origin https://github.com/flatlogic/awesome-bootstrap-checkbox.git
18
+ ````
17
19
18
20
Use
19
21
------------
20
22
21
23
First just include ** awesome-bootstrap-checkbox.css** somewhere in your html. Or ** awesome-bootstrap-checkbox.scss** if you use sass.
22
24
Next everything is based on code convention. Here is checkbox markup from Bootstrap site:
23
25
24
- <form role="form">
25
- ...
26
- <div class="checkbox">
27
- <label>
28
- <input type="checkbox"> Check me out
29
- </label>
30
- </div>
31
- ...
32
- </form>
26
+ ```` html
27
+ <form role =" form" >
28
+ ...
29
+ <div class =" checkbox" >
30
+ <label >
31
+ <input type =" checkbox" > Check me out
32
+ </label >
33
+ </div >
34
+ ...
35
+ </form >
36
+ ````
33
37
34
38
We have to alter it a bit:
35
-
36
- <form role="form">
37
- ...
38
- <div class="checkbox">
39
- <input type="checkbox" id="checkbox1">
40
- <label for="checkbox1">
41
- Check me out
42
- </label>
43
- </div>
44
- ...
45
- </form>
46
-
39
+ ```` html
40
+ <form role =" form" >
41
+ ...
42
+ <div class =" checkbox" >
43
+ <input type =" checkbox" id =" checkbox1" >
44
+ <label for =" checkbox1" >
45
+ Check me out
46
+ </label >
47
+ </div >
48
+ ...
49
+ </form >
50
+ ````
47
51
That's it. It will work. But it ** will not** work if you nest input inside label or put label before input.
48
52
49
53
Radios
50
54
------------
51
55
52
56
It's the same for radios. Markup has to be the following:
53
-
54
- <form role="form">
55
- ...
56
- <div class="radio">
57
- <input type="radio" name="radio2" id="radio3" value="option1">
58
- <label for="radio3">
59
- One
60
- </label>
61
- </div>
62
- <div class="radio">
63
- <input type="radio" name="radio2" id="radio4" value="option2" checked>
64
- <label for="radio4">
65
- Two
66
- </label>
67
- </div>
68
- ...
69
- </form>
57
+ ```` html
58
+ <form role =" form" >
59
+ ...
60
+ <div class =" radio" >
61
+ <input type =" radio" name =" radio2" id =" radio3" value =" option1" >
62
+ <label for =" radio3" >
63
+ One
64
+ </label >
65
+ </div >
66
+ <div class =" radio" >
67
+ <input type =" radio" name =" radio2" id =" radio4" value =" option2" checked >
68
+ <label for =" radio4" >
69
+ Two
70
+ </label >
71
+ </div >
72
+ ...
73
+ </form >
74
+ ````
70
75
71
76
Brand Colors
72
77
------------
@@ -79,16 +84,17 @@ Glyphicons way (Opt-out Font Awesome)
79
84
------------
80
85
81
86
If you want to use glyphicons instead of font-awesome then override ` .checkbox ` class:
82
-
83
- .checkbox input[type=checkbox]:checked + label:after {
84
- font-family: 'Glyphicons Halflings';
85
- content: "\e013";
86
- }
87
- .checkbox label:after {
88
- padding-left: 4px;
89
- padding-top: 2px;
90
- font-size: 9px;
91
- }
87
+ ```` css
88
+ .checkbox input [type = checkbox ]:checked + label :after {
89
+ font-family : ' Glyphicons Halflings' ;
90
+ content : " \e013 " ;
91
+ }
92
+ .checkbox label :after {
93
+ padding-left : 4px ;
94
+ padding-top : 2px ;
95
+ font-size : 9px ;
96
+ }
97
+ ````
92
98
93
99
Credits
94
100
------------
0 commit comments