Skip to content

Commit 1e48f47

Browse files
committed
line-height
1 parent b5b0c5e commit 1e48f47

File tree

8 files changed

+196
-208
lines changed

8 files changed

+196
-208
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 1.1.1
4+
5+
* Fixed `line-height` issue
6+
37
## 1.1.0
48

59
* Fixed keyboard accessibility

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bootstrap4c-custom-switch",
33
"description": "Bootstrap 4 Component - Custom switch",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"license": "MIT",
66
"authors": [
77
{ "name": "Martin Haubek", "email": "[email protected]", "homepage": "https://haubek.github.io" }

dist/css/component-custom-switch.css

Lines changed: 173 additions & 196 deletions
Large diffs are not rendered by default.

dist/css/component-custom-switch.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@
5151
<input class="custom-switch-input" id="example_06" type="checkbox">
5252
<label class="custom-switch-btn" for="example_06"></label>
5353
</div>
54-
<p>I'm <code>sm</code></p>
54+
<p class="my-2">I'm <code>custom-switch-sm</code></p>
5555

5656
<hr>
5757

5858
<div class="custom-switch custom-switch-label-onoff custom-switch-xs pl-0">
5959
<input class="custom-switch-input" id="example_07" type="checkbox">
6060
<label class="custom-switch-btn" for="example_07"></label>
6161
</div>
62-
<p>I'm <code>xs</code></p>
62+
<p class="my-2">I'm <code>custom-switch-xs</code></p>
6363

6464
<hr>
6565

6666
<div class="custom-switch custom-switch-label-yesno pl-0">
6767
<input class="custom-switch-input" id="example_08" type="checkbox">
6868
<label class="custom-switch-btn" for="example_08"></label>
69-
<div class="custom-switch-content-checked">
69+
<div class="custom-switch-content-checked my-3">
7070
<span class="text-success">I'm checked</span>
7171
</div>
72-
<div class="custom-switch-content-unchecked">
72+
<div class="custom-switch-content-unchecked my-3">
7373
<span class="text-danger">I'm unchecked (click me!)</span>
7474
</div>
7575
</div>
@@ -80,24 +80,25 @@
8080
<input class="custom-switch-input" id="example_09" type="checkbox" required>
8181
<label class="custom-switch-btn" for="example_09"></label>
8282
</div>
83-
<p>I'm <code>required</code></p>
83+
<p class="my-2">I'm <code>required</code></p>
8484

8585
<hr>
8686

8787
<div class="custom-switch pl-0">
8888
<input class="custom-switch-input" id="example_10" type="checkbox" disabled>
8989
<label class="custom-switch-btn" for="example_10"></label>
9090
</div>
91+
<br>
9192
<div class="custom-switch pl-0">
9293
<input class="custom-switch-input" id="example_11" type="checkbox" checked disabled>
9394
<label class="custom-switch-btn" for="example_11"></label>
9495
</div>
95-
<p>I'm <code>disabled</code></p>
96+
<p class="my-2">I'm <code>disabled</code></p>
9697

9798
<hr>
9899

99100
<div class="form-group">
100-
<div for="example_12">I'm a &lt;div&gt; form label:</div>
101+
<label for="example_12">I'm a &lt;label&gt; and can be clicked:</label>
101102
<div class="custom-switch pl-0">
102103
<input type="checkbox" class="custom-switch-input" id="example_12" checked>
103104
<label class="custom-switch-btn text-hide" for="example_12">{value}</label>
@@ -114,7 +115,7 @@
114115
</div>
115116
</div>
116117
</form>
117-
<p>I'm <code>invalid</code></p>
118+
<p class="my-2">I'm <code>invalid</code></p>
118119

119120
</div>
120121
</div>

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "bootstrap4c-custom-switch",
33
"description": "Bootstrap 4 Component - Custom switch",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"license": "MIT",
66
"author": {
77
"name": "Martin Haubek",
88
"email": "[email protected]"
99
},
10+
"scripts": {
11+
"build": "gulp build"
12+
},
1013
"repository": {
1114
"type": "git",
1215
"url": "https://github.com/haubek/bootstrap4c-custom-switch"

src/scss/_component-custom-switch.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.custom-switch {
2+
line-height: ($switch-font-size + $switch-unit);
23
.custom-switch-input {
34
position: absolute;
45
z-index: -1;
@@ -150,6 +151,7 @@
150151
}
151152
}
152153
.custom-switch-sm {
154+
line-height: ($switch-font-size-sm + $switch-unit);
153155
.custom-switch-input {
154156
+ .custom-switch-btn {
155157
width: ($switch-width-sm + $switch-unit);
@@ -222,6 +224,7 @@
222224
}
223225
}
224226
.custom-switch-xs {
227+
line-height: ($switch-font-size-xs + $switch-unit);
225228
.custom-switch-input {
226229
+ .custom-switch-btn {
227230
width: ($switch-width-xs + $switch-unit);

src/scss/build.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
*
55
* Bootstrap 4 Component - Custom switch
6-
* Version: 1.1.0
6+
* Version: 1.1.1
77
* Copyright (c) 2017-18 Martin Haubek
88
*
99
*

0 commit comments

Comments
 (0)