Skip to content

Commit 165af27

Browse files
committed
Prepare to change Bootstrap version to 4.0.0alpha2
1 parent cbb364a commit 165af27

File tree

338 files changed

+33620
-36100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+33620
-36100
lines changed

README.md

Lines changed: 22 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Awesome Bootstrap Checkbox
22
==========================
33

4-
[Font Awesome][] [Bootstrap][] Checkboxes & Radios plugin. Pure CSS way to make inputs look prettier. **No Javascript!**
4+
Font Awesome Bootstrap Checkboxes & Radios plugin. Pure css way to make inputs look prettier. **No javascript**!
55

6-
**[Demo][]**
6+
**[Demo](http://flatlogic.github.io/awesome-bootstrap-checkbox/demo/)**
77

88
Use
99
------------
1010

11-
First just include **awesome-bootstrap-checkbox.css** somewhere in your HTML, or add the equivalent files to your [Sass](#using-sass) / [Less](#using-less) configuration.
12-
Next, everything is based on code convention. Here is checkbox markup from Bootstrap site:
11+
First just include **awesome-bootstrap-checkbox.css** somewhere in your html. Or **awesome-bootstrap-checkbox.scss** if you use sass.
12+
Next everything is based on code convention. Here is checkbox markup from Bootstrap site:
1313

1414
````html
1515
<form role="form">
@@ -83,96 +83,39 @@ You may use `checkbox-primary`, `checkbox-danger`, `radio-info`, etc to style ch
8383

8484
`checkbox-circle` is for rounded checkboxes.
8585

86-
Inputs without label text:
86+
`checkbox-single` and `radio-single` for inputs without label text.
8787

88-
````html
89-
<div class="checkbox">
90-
<input type="checkbox" class="styled" id="singleCheckbox1" value="option1" aria-label="Single checkbox One">
91-
<label></label>
92-
</div>
93-
````
94-
95-
Using [Sass][]
96-
----------
97-
98-
As per example in the `demo` folder, to use Font Awesome you'll have to `@import` the following library parts:
99-
100-
````scss
101-
@import "../bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/variables";
102-
@import "../bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/mixins";
103-
104-
@import "../bower_components/Font-Awesome/scss/variables";
105-
106-
@import "../awesome-bootstrap-checkbox";
107-
````
108-
109-
Adjust this to the path where your bootstrap and font-awesome files are located.
110-
111-
Using [Less][]
112-
----------
113-
114-
Just like the Sass setup, you'll have to `@import` the following library parts:
115-
116-
````less
117-
@import "../bower_components/bootstrap/less/variables";
118-
@import "../bower_components/bootstrap/less/mixins";
119-
120-
@import "../awesome-bootstrap-checkbox";
121-
122-
@import "../bower_components/Font-Awesome/less/variables";
123-
````
124-
125-
Custom icon font
88+
Glyphicons way (Opt-out Font Awesome)
12689
------------
12790

128-
If you want to use another icon font instead of Font Awesome, such as [Glyphicons][], override the default variables:
129-
````scss
130-
$font-family-icon: 'Glyphicons Halflings';
131-
$check-icon: "\e013";
132-
133-
.checkbox label:after {
134-
padding-left: 4px;
135-
padding-top: 2px;
136-
font-size: 9px;
137-
}
138-
````
139-
140-
or for Less:
141-
````less
142-
@font-family-icon: 'Glyphicons Halflings';
143-
@check-icon: "\e013";
144-
145-
// Same styles as the Sass example...
146-
````
147-
148-
Or for plain CSS, override the `.checkbox` class (and `.styled` class for Opera):
91+
If you want to use glyphicons instead of font-awesome then override `.checkbox` class:
14992
````css
150-
input[type="checkbox"].styled:checked + label:after,
151-
input[type="radio"].styled:checked + label:after,
15293
.checkbox input[type=checkbox]:checked + label:after {
15394
font-family: 'Glyphicons Halflings';
15495
content: "\e013";
15596
}
156-
157-
input[type="checkbox"].styled:checked label:after,
158-
input[type="radio"].styled:checked label:after,
15997
.checkbox label:after {
16098
padding-left: 4px;
16199
padding-top: 2px;
162100
font-size: 9px;
163101
}
164102
````
165103

166-
Credits
167-
------------
104+
Using SASS
105+
----------
168106

169-
Based on the [Official Bootstrap Sass port][Bootstrap Sass] and the awesome [Font Awesome][].
107+
As per example in the `demo` folder, to use these **awesome** you'll have to `@import` the following library parts:
170108

109+
````scss
110+
@import "../bootstrap/scss/variables";
111+
@import "../bootstrap/scss/mixins";
112+
113+
@import "../Font-Awesome/scss/variables";
114+
````
115+
116+
Adjust this to the path where your bootstrap and font-awesome files are located.
117+
118+
Credits
119+
------------
171120

172-
[Demo]: http://flatlogic.github.io/awesome-bootstrap-checkbox/demo/
173-
[Bootstrap]: http://getbootstrap.com/
174-
[Bootstrap Sass]: https://github.com/twbs/bootstrap-sass
175-
[Font Awesome]: https://github.com/FortAwesome/Font-Awesome
176-
[Glyphicons]: http://getbootstrap.com/components/#glyphicons
177-
[Sass]: http://sass-lang.com/
178-
[Less]: http://lesscss.org/
121+
Based on the [Bootstrap 4][http://getbootstrap.com/] and the awesome [Font Awesome](https://github.com/FortAwesome/Font-Awesome).

awesome-bootstrap-checkbox.less

Lines changed: 0 additions & 211 deletions
This file was deleted.

awesome-bootstrap-checkbox.scss

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
//
2+
// Mixins
3+
// --------------------------------------------------
4+
5+
6+
@mixin scale($ratio...) {
7+
-webkit-transform: scale($ratio);
8+
-ms-transform: scale($ratio); // IE9 only
9+
-o-transform: scale($ratio);
10+
transform: scale($ratio);
11+
}
12+
13+
@mixin transition-transform($transition...) {
14+
-webkit-transition: -webkit-transform $transition;
15+
-moz-transition: -moz-transform $transition;
16+
-o-transition: -o-transform $transition;
17+
transition: transform $transition;
18+
}
19+
20+
@mixin transition($transition...) {
21+
-webkit-transition: $transition;
22+
-o-transition: $transition;
23+
transition: $transition;
24+
}
25+
26+
127
//
228
// Checkboxes
329
// --------------------------------------------------
@@ -38,7 +64,7 @@ $check-icon: $fa-var-check !default;
3864
height: 17px;
3965
left: 0;
4066
margin-left: -20px;
41-
border: 1px solid $input-border;
67+
border: 1px solid $input-border-color;
4268
border-radius: 3px;
4369
background-color: #fff;
4470
@include transition(border 0.15s ease-in-out, color 0.15s ease-in-out);
@@ -138,7 +164,7 @@ $check-icon: $fa-var-check !default;
138164
height: 17px;
139165
left: 0;
140166
margin-left: -20px;
141-
border: 1px solid $input-border;
167+
border: 1px solid $input-border-color;
142168
border-radius: 50%;
143169
background-color: #fff;
144170
@include transition(border 0.15s ease-in-out);

0 commit comments

Comments
 (0)