bootstrap-checkbox-x
Version:
An extended checkbox plugin for bootstrap with three states and additional styles.
194 lines (163 loc) • 3.85 kB
CSS
/*!
* @copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021
* @version 1.5.7
*
* An extended checkbox plugin for Bootstrap 3 that allows three states and additional styles.
*
* For more JQuery/Bootstrap plugins and demos visit http://plugins.krajee.com
* For more Yii related demos visit http://demos.krajee.com
*/
.cbx-loading {
width: 25px;
height: 25px;
font-size: 0;
color: #fff;
background: transparent url('../img/loading.gif') top left no-repeat;
border: none;
}
.cbx, .cbx-container {
display: inline-block;
cursor: pointer;
text-align: center;
vertical-align: middle;
}
.cbx {
text-align: center;
vertical-align: middle;
border-radius: 3px;
position: relative;
}
.cbx, .cbx-container, .cbx-label {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.cbx-label {
cursor: pointer;
font-weight: 400;
margin: 0;
}
.cbx-label.disabled {
cursor: not-allowed;
opacity: .65;
}
label + .cbx-container, .cbx-container + label, .cbx-container + .cbx-container {
margin-left: 5px;
}
label .cbx {
margin: 0 5px;
}
label + .cbx-block, .cbx-block + label, .cbx-block + .cbx-block, label .cbx-block {
margin-left: 0;
margin-right: 0;
}
.cbx-xs {
width: 16px;
height: 16px;
font-size: 10px;
}
.cbx-sm {
width: 20px;
height: 20px;
font-size: 13px;
}
.cbx-md {
width: 24px;
height: 24px;
font-size: 15px;
}
.cbx-lg {
border-radius: 4px;
width: 30px;
height: 30px;
font-size: 20px;
}
.cbx-xl {
border-radius: 5px;
width: 36px;
height: 36px;
font-size: 24px;
}
.cbx-icon {
position: absolute;
margin: 1px;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.cbx-icon-krajee {
position: absolute;
top: 15%;
bottom: 15%;
left: 15%;
right: 15%;
}
.cbx-active {
border: 1px solid #ccc;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-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;
color: #333;
}
.cbx-active:hover, .cbx-active:focus {
border-color: #86b7fe;
outline: 0;
box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
}
.cbx-disabled {
color: #ddd;
background: #fcfcfc;
border: 1px solid #ddd;
cursor: not-allowed;
}
.has-success .cbx-active {
border-color: #198754;
color: #198754;
}
.has-success .cbx-active:hover, .has-success .cbx-active:focus {
border-color: #198754;
box-shadow: 0 0 0 0.25rem rgb(25 135 84 / 25%);
}
.has-warning .cbx-active {
border-color: #ffc107;
color: #ffc107;
}
.has-warning .cbx-active:hover, .has-warning .cbx-active:focus {
border-color: #ffc107;
box-shadow: 0 0 0 0.25rem rgb(255 193 7 / 25%);
}
.has-error .cbx-active {
border-color: #dc3545;
color: #dc3545;
}
.has-error .cbx-active:hover, .has-error .cbx-active:focus {
border-color: #dc3545;
box-shadow: 0 0 0 0.25rem rgb(220 53 69 / 25%);
}
.has-success .cbx-label {
color: #198754;
}
.has-warning .cbx-label {
color: #ffc107;
}
.has-error .cbx-label {
color: #dc3545;
}
.cbx-block {
display: block;
text-align: left;
}
.cbx-block + .cbx-block {
margin: 5px 0 0 0;
}
.cbx-krajee, .cbx-enclosed {
display: inline-flex;
align-items: center;
}
.cbx-krajee input[type=checkbox] {
margin: 3px 3px 0;
}