Skip to content

Commit 9bf88c0

Browse files
committed
updated for v1.0.0
1 parent 5a6e708 commit 9bf88c0

File tree

4 files changed

+63
-29
lines changed

4 files changed

+63
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![MIT Licence](https://img.shields.io/github/license/gitbrent/bootstrap-switch-button.svg)](https://opensource.org/licenses/mit-license.php) [![Bootstrap 4.2.1](https://img.shields.io/badge/bootstrap-4.2.1-green.svg?style=flat-square)](https://getbootstrap.com/docs/4.1) [![Known Vulnerabilities](https://snyk.io/test/npm/bootstrap-switch-button/badge.svg)](https://snyk.io/test/npm/bootstrap-switch-button) [![JSDelivr Badge](https://data.jsdelivr.com/v1/package/gh/gitbrent/bootstrap-switch-button/badge)](https://www.jsdelivr.com/package/gh/gitbrent/bootstrap-switch-button)
1+
[![MIT Licence](https://img.shields.io/github/license/gitbrent/bootstrap-switch-button.svg)](https://opensource.org/licenses/mit-license.php) [![Bootstrap 4.3.1](https://img.shields.io/badge/bootstrap-4.3.1-green.svg?style=flat-square)](https://getbootstrap.com/docs/4.1) [![Known Vulnerabilities](https://snyk.io/test/npm/bootstrap-switch-button/badge.svg)](https://snyk.io/test/npm/bootstrap-switch-button)
22

33
# Bootstrap Switch Button
44

css/bootstrap-switch-button.css

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
/*\
2-
|*| ========================================================================
3-
|*| Bootstrap Switch Button: bootstrap-switch-button.css v1.0.0
4-
|*| https://gitbrent.github.io/bootstrap-switch-button/
5-
|*| ========================================================================
6-
|*| Copyright 2018-2019 Brent Ely
7-
|*| Licensed under MIT
8-
|*| ========================================================================
2+
|*| :: Bootstrap Switch Button ::
3+
|*|
4+
|*| Bootstrap Switch Button
5+
|*| https://github.com/gitbrent/bootstrap-switch-button
6+
|*|
7+
|*| This library is released under the MIT Public License (MIT)
8+
|*|
9+
|*| Bootstrap Switch Button (C) 2019-present Brent Ely (https://github.com/gitbrent)
10+
|*|
11+
|*| Permission is hereby granted, free of charge, to any person obtaining a copy
12+
|*| of this software and associated documentation files (the "Software"), to deal
13+
|*| in the Software without restriction, including without limitation the rights
14+
|*| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15+
|*| copies of the Software, and to permit persons to whom the Software is
16+
|*| furnished to do so, subject to the following conditions:
17+
|*|
18+
|*| The above copyright notice and this permission notice shall be included in all
19+
|*| copies or substantial portions of the Software.
20+
|*|
21+
|*| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
|*| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23+
|*| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24+
|*| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25+
|*| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26+
|*| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27+
|*| SOFTWARE.
928
\*/
1029

1130
.btn-group-xs > .btn, .btn-xs {
@@ -113,24 +132,23 @@
113132
opacity: 0.5;
114133
}
115134

135+
/* bootstrap-4.x .form-control {height} values used as `min-height` to mirror output sizes */
136+
116137
/* NOTE: Must come first, so classes below override as needed */
117-
/* [default] (bootstrap-4.1.3 - .btn - h:38px) */
118-
.switch.btn { min-width: 3.7rem; min-height: 2.15rem; }
138+
.switch.btn { min-width: 3.7rem; min-height: calc(1.5em + .75rem + 2px); }
119139
.switch-on.btn { padding-right: 1.5rem; }
120140
.switch-off.btn { padding-left: 1.5rem; }
121141

122-
/* `lg` (bootstrap-4.1.3 - .btn - h:48px) */
123-
.switch.btn-lg { min-width: 5rem; min-height: 2.815rem; }
142+
.switch.btn-lg { min-width: 5rem; line-height: 1.5; min-height: calc(1.5em + 1rem + 2px); }
124143
.switch-on.btn-lg { padding-right: 2rem; }
125144
.switch-off.btn-lg { padding-left: 2rem; }
126145
.switch-handle.btn-lg { width: 2.5rem; }
127146

128-
/* `sm` (bootstrap-4.1.3 - .btn - h:31px) */
129-
.switch.btn-sm { min-width: 3.125rem; min-height: 1.938rem; }
147+
.switch.btn-sm { min-width: 3.25rem; min-height: calc(1.5em + .5rem + 2px); }
130148
.switch-on.btn-sm { padding-right: 1rem; }
131149
.switch-off.btn-sm { padding-left: 1rem; }
132150

133151
/* `xs` (bootstrap-3.3 - .btn - h:22px) */
134-
.switch.btn-xs { min-width: 2.19rem; min-height: 1.375rem; }
152+
.switch.btn-xs { min-width: 3.125rem; min-height: 1.375rem; }
135153
.switch-on.btn-xs { padding-right: .8rem; }
136154
.switch-off.btn-xs { padding-left: .8rem; }

js/bootstrap-switch-button.js

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
/*\
2-
|*| ========================================================================
3-
|*| Bootstrap Switch Button: bootstrap-switch-button.js
4-
|*| https://gitbrent.github.io/bootstrap-switch-button/
5-
|*| ========================================================================
6-
|*| APP_VER: 1.0.0-alpha
7-
|*| APP_BLD: 20190128
8-
|*| ========================================================================
9-
|*| Copyright 2018-2019 Brent Ely
10-
|*| Licensed under MIT
11-
|*| ========================================================================
2+
|*| :: Bootstrap Switch Button ::
3+
|*|
4+
|*| Bootstrap Switch Button
5+
|*| https://github.com/gitbrent/bootstrap-switch-button
6+
|*|
7+
|*| This library is released under the MIT Public License (MIT)
8+
|*|
9+
|*| Bootstrap Switch Button (C) 2019-present Brent Ely (https://github.com/gitbrent)
10+
|*|
11+
|*| Permission is hereby granted, free of charge, to any person obtaining a copy
12+
|*| of this software and associated documentation files (the "Software"), to deal
13+
|*| in the Software without restriction, including without limitation the rights
14+
|*| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15+
|*| copies of the Software, and to permit persons to whom the Software is
16+
|*| furnished to do so, subject to the following conditions:
17+
|*|
18+
|*| The above copyright notice and this permission notice shall be included in all
19+
|*| copies or substantial portions of the Software.
20+
|*|
21+
|*| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
|*| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23+
|*| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24+
|*| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25+
|*| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26+
|*| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27+
|*| SOFTWARE.
1228
\*/
1329
"use strict";
1430

test/test-all-sizes.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
66
<title>bootstrap-switch-button size check</title>
7-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
7+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
88
<!--
99
<link rel="stylesheet "href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap-switch-button@latest/css/bootstrap-switch-button.min.css">
1010
-->
1111
<link rel="stylesheet" href="../css/bootstrap-switch-button.css">
1212

1313
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
14-
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
14+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
1515
<!--
1616
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap-switch-button@latest/js/bootstrap-switch-button.min.js"></script>
1717
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap-switch-button@master/js/bootstrap-switch-button.min.js"></script>
@@ -21,7 +21,7 @@
2121
<script>
2222
// APP
2323
const APP_VER = '1.0.0';
24-
const APP_REL = '20190128';
24+
const APP_REL = '20190305';
2525

2626
// ==================================================================================================================
2727

@@ -58,7 +58,7 @@
5858
<h1 class="text-primary font-weight-light">Rendered Size Check</h1>
5959
</div>
6060
<div class="col-2 pr-0">
61-
<h5 class="text-secondary font-weight-light">Bootstrap 4.2.1</h5>
61+
<h5 class="text-secondary font-weight-light">Bootstrap 4.3.1</h5>
6262
</div>
6363
</div>
6464
<div class="row">

0 commit comments

Comments
 (0)