fixed disabled on checkbox

This commit is contained in:
Kevin Ross 2015-12-15 18:07:09 -06:00
parent b8b9dc1090
commit e04df20616
2 changed files with 25 additions and 17 deletions

View File

@ -4,19 +4,6 @@ label.checkbox-inline {
padding-left: 0; // Reset for Bootstrap rule
cursor: pointer;
// Hide native checkbox
input[type=checkbox] {
position: absolute;
left: 0;
z-index: -1;
width: 0;
height: 0;
margin: 0;
overflow: hidden;
pointer-events: none;
opacity: 0;
}
.checkbox-decorator {
position: relative;
top: 3px;
@ -69,6 +56,17 @@ label.checkbox-inline {
input[type=checkbox] {
// Hide native checkbox
position: absolute;
left: 0;
z-index: -1;
width: 0;
height: 0;
margin: 0;
overflow: hidden;
pointer-events: none;
opacity: 0;
&:focus + .checkbox-decorator .check::after {
opacity: 0.2;
}
@ -112,12 +110,21 @@ label.checkbox-inline {
}
}
&[disabled],
fieldset[disabled] & {
+ .checkbox-decorator .check::after,
.check::after {
background-color: $mdb-text-color-primary;
transform: rotate(-45deg);
}
+ .checkbox-decorator .check,
.check {
border-color: $mdb-checkbox-border-color-disabled;
}
}
}
input[type=checkbox][disabled] + .checkbox-decorator .check::after {
background-color: $mdb-text-color-primary;
transform: rotate(-45deg);
}
}
@keyframes checkbox-on {

View File

@ -85,6 +85,7 @@ $mdb-checkbox-animation-ripple: 500ms !default;
$mdb-checkbox-animation-check: 0.3s !default;
$mdb-checkbox-checked-color: $brand-primary !default;
$mdb-checkbox-border-color: $mdb-label-color-inner-focus !default;
$mdb-checkbox-border-color-disabled: $gray-light !default; //#bdbdbd !default;
// Switches
$mdb-switch-label-padding: .3125rem !default; // 5px