Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paperkit theme #705

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.4

- Full Bootstrap 4 integration of CSS + sources SASS/SCSS

## 3.3.4

- Fix Object.assign not working for IE <= 11 [#616](https://github.com/Bttstrp/bootstrap-switch/issues/616)
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[![NPM Version](http://img.shields.io/npm/v/bootstrap-switch.svg?style=flat)](https://www.npmjs.org/)

Turn checkboxes and radio buttons into toggle switches. Created by [Mattia Larentis](http://github.com/nostalgiaz), maintained by [Emanuele Marchi](http://github.com/lostcrew) and [Peter Stein](http://www.bdmdesign.org) with the help of the community.
Compatible with Bootstrap 4, Bootstrap 3 and Bootstrap 2.

Play with [demo on my fiddle](https://jsfiddle.net/djibe89/vL87w0j8/).

## Quick start

Expand Down Expand Up @@ -49,6 +52,10 @@ IE9+ and all the other modern browsers.
- For Bootstrap 2 (no longer officially supported), import `src/less/bootstrap2/bootstrap-switch.less`
- For Bootstrap 3, import `src/less/bootstrap3/bootstrap-switch.less`

## SASS/SCSS

- For Bootstrap 4, import `src/sass/bootstrap4/bootstrap-switch.scss`

## Bugs and feature requests

Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/Bttstrp/bootstrap-switch/issues/new).
Expand Down
250 changes: 250 additions & 0 deletions dist/css/bootstrap4/bootstrap-switch-pktheme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
/**
* bootstrap-switch paperkit theme - Turn checkboxes and radio buttons into toggle switches.
*
* @version v3.4 for Bootstrap 4.x
* @homepage https://bttstrp.github.io/bootstrap-switch
* @author Mattia Larentis <[email protected]> (http://larentis.eu)
* & djibe
* @license Apache-2.0
*/
.bootstrap-switch {
display: inline-block;
direction: ltr;
cursor: pointer;
border-radius: 30px;
border: 0;
position: relative;
text-align: left;
height: 26px;
outline: none;
overflow: hidden;
line-height: 8px;
width: 61px !important;
z-index: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
vertical-align: middle;
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
margin-bottom: 5px;
margin-right: 1px;
}
.bootstrap-switch .bootstrap-switch-container {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
height: 26px;
top: 0;
border-radius: 30px;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
width: 100px !important;
}
.bootstrap-switch .bootstrap-switch-handle-on,
.bootstrap-switch .bootstrap-switch-handle-off,
.bootstrap-switch .bootstrap-switch-label {
-webkit-box-sizing: border-box;
box-sizing: border-box;
cursor: pointer;
display: inline-block !important;
height: 100%;
color: #fff;
vertical-align: middle;
padding: 6px 12px;
font-size: 11px;
text-indent: -5px;
line-height: 15px;
-webkit-transition: 0.25s ease-out;
transition: 0.25s ease-out;
}
.bootstrap-switch .bootstrap-switch-handle-on i,
.bootstrap-switch .bootstrap-switch-handle-off i,
.bootstrap-switch .bootstrap-switch-label i {
font-size: 12px;
line-height: 14px;
}
.bootstrap-switch .bootstrap-switch-handle-on,
.bootstrap-switch .bootstrap-switch-handle-off {
text-align: center;
z-index: 1;
float: left;
width: 50% !important;
background-color: #66615b;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
background: #51cbce;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
background: #cfcfca;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-secondary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-secondary {
background: #66615b;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
background: #51bcda;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
background: #6bd098;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
background: #fbc658;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
background: #f5593d;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-label {
border-radius: 12px;
position: relative;
text-align: center;
float: left;
margin: 2px -11px;
z-index: 100;
color: #333;
background: #fff;
width: 22px !important;
height: 22px;
padding: 0;
-webkit-box-shadow: 0 1px 1px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 1px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.25);
}
.bootstrap-switch span::before {
content: "\200b";
}
.bootstrap-switch .bootstrap-switch-handle-on {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch .bootstrap-switch-handle-off {
text-indent: 6px;
}
.bootstrap-switch input[type='radio'],
.bootstrap-switch input[type='checkbox'] {
position: absolute !important;
top: 0;
left: 0;
margin: 0;
z-index: -1;
opacity: 0;
filter: alpha(opacity=0);
visibility: hidden;
}
.bootstrap-switch input[type='radio'].form-control,
.bootstrap-switch input[type='checkbox'].form-control {
height: auto;
}
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
}
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
}
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
padding: 6px 16px;
font-size: 18px;
line-height: 1.33;
}
.bootstrap-switch.bootstrap-switch-disabled, .bootstrap-switch.bootstrap-switch-readonly, .bootstrap-switch.bootstrap-switch-indeterminate {
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on, .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on, .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on, .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off, .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off, .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off, .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label, .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label, .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
-webkit-transition: margin-left 0.5s;
transition: margin-left 0.5s;
}
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
border-radius: 0 3px 3px 0;
}
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
border-radius: 3px 0 0 3px;
}
.bootstrap-switch.bootstrap-switch-focused {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label, .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label, .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container {
margin-left: -2px !important;
}
.bootstrap-switch.bootstrap-switch-on:hover .bootstrap-switch-label {
width: 26px !important;
margin: 2px -15px;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-off {
background: #66615b;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-danger {
background-color: #f5593d;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-warning {
background-color: #fbc658;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-success {
background-color: #6bd098;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-primary {
background-color: #51cbce;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-secondary {
background-color: #66615b;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-info {
background-color: #51bcda;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container {
margin-left: -37px !important;
}
.bootstrap-switch.bootstrap-switch-off:hover .bootstrap-switch-label {
width: 26px !important;
margin: 2px -15px -13px -11px;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-danger,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-primary,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-info,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-warning,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-success {
background-color: #cfcfca;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-on {
background-color: #cfcfca;
}
1 change: 1 addition & 0 deletions dist/css/bootstrap4/bootstrap-switch-pktheme.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading