Skip to content

Commit 7f19763

Browse files
committed
Merge pull request #16 from esbanarango/master
Adding syntax highlight to readme.md
2 parents 2e09fbc + 2b1188c commit 7f19763

File tree

1 file changed

+55
-49
lines changed

1 file changed

+55
-49
lines changed

README.md

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -13,60 +13,65 @@ We have transferred Awesome Bootstrap Checkbox to a new location under our organ
1313
redirects from old urls, we strongly recommend updating any existing local clones to point to the new repository URL. You can
1414
do this by using `git remote` on the command line:
1515

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+
````
1719

1820
Use
1921
------------
2022

2123
First just include **awesome-bootstrap-checkbox.css** somewhere in your html. Or **awesome-bootstrap-checkbox.scss** if you use sass.
2224
Next everything is based on code convention. Here is checkbox markup from Bootstrap site:
2325

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+
````
3337

3438
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+
````
4751
That's it. It will work. But it **will not** work if you nest input inside label or put label before input.
4852

4953
Radios
5054
------------
5155

5256
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+
````
7075

7176
Brand Colors
7277
------------
@@ -79,16 +84,17 @@ Glyphicons way (Opt-out Font Awesome)
7984
------------
8085

8186
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+
````
9298

9399
Credits
94100
------------

0 commit comments

Comments
 (0)