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 padding-left: 0; // Reset for Bootstrap rule
cursor: pointer; 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 { .checkbox-decorator {
position: relative; position: relative;
top: 3px; top: 3px;
@ -69,6 +56,17 @@ label.checkbox-inline {
input[type=checkbox] { 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 { &:focus + .checkbox-decorator .check::after {
opacity: 0.2; opacity: 0.2;
} }
@ -112,12 +110,21 @@ label.checkbox-inline {
} }
} }
}
input[type=checkbox][disabled] + .checkbox-decorator .check::after { &[disabled],
fieldset[disabled] & {
+ .checkbox-decorator .check::after,
.check::after {
background-color: $mdb-text-color-primary; background-color: $mdb-text-color-primary;
transform: rotate(-45deg); transform: rotate(-45deg);
} }
+ .checkbox-decorator .check,
.check {
border-color: $mdb-checkbox-border-color-disabled;
}
}
}
} }
@keyframes checkbox-on { @keyframes checkbox-on {

View File

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