aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2018-01-12 17:32:56 -0800
committerMark Otto <[email protected]>2018-01-12 17:32:56 -0800
commit44eedf3e58a4a1697233efdd57dea5f347cc0833 (patch)
treedf0b7def653cf15d1d4f2a260e742ca50745b7ec
parent6d8d8639f3a290cba93ef406c59ea31ad46e1c6d (diff)
parent4a1bc75152ce3bbe829a5dd4d8d2e7fa1562b154 (diff)
downloadbootstrap-44eedf3e58a4a1697233efdd57dea5f347cc0833.tar.xz
bootstrap-44eedf3e58a4a1697233efdd57dea5f347cc0833.zip
Merge branch 'custom-check-disabled' of https://github.com/gijsbotje/bootstrap into v4-dev
-rw-r--r--scss/_custom-forms.scss15
-rw-r--r--scss/_variables.scss1
2 files changed, 16 insertions, 0 deletions
diff --git a/scss/_custom-forms.scss b/scss/_custom-forms.scss
index d99a86dc7..dd844c07f 100644
--- a/scss/_custom-forms.scss
+++ b/scss/_custom-forms.scss
@@ -117,6 +117,15 @@
background-image: $custom-checkbox-indicator-icon-indeterminate;
}
}
+
+ .custom-control-input:disabled {
+ &:checked ~ .custom-control-label::before {
+ background-color: $custom-control-indicator-checked-disabled-bg;
+ }
+ &:indeterminate ~ .custom-control-label::before {
+ background-color: $custom-control-indicator-checked-disabled-bg;
+ }
+ }
}
// Radios
@@ -136,6 +145,12 @@
background-image: $custom-radio-indicator-icon-checked;
}
}
+
+ .custom-control-input:disabled {
+ &:checked ~ .custom-control-label::before {
+ background-color: $custom-control-indicator-checked-disabled-bg;
+ }
+ }
}
diff --git a/scss/_variables.scss b/scss/_variables.scss
index 3e47a1d1e..b903f5f58 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -449,6 +449,7 @@ $custom-control-label-disabled-color: $gray-600 !default;
$custom-control-indicator-checked-color: $white !default;
$custom-control-indicator-checked-bg: theme-color("primary") !default;
+$custom-control-indicator-checked-disabled-bg: rgba(theme-color("primary"), .5) !default;
$custom-control-indicator-checked-box-shadow: none !default;
$custom-control-indicator-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;