aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-06-08 13:57:44 -0700
committerMark Otto <[email protected]>2014-06-08 13:57:44 -0700
commitd1872b4c98f26b1bfcd7e007133b97e6602dd0d0 (patch)
treeccc12bda1d6df512fbc9c4023b296f46a6f05e3f /less/forms.less
parent5872a7e0aca5e2b5b8e0be5df8b2a7cdf987d805 (diff)
parent5cd72ce23058b47a739c7e2005ab5c3d4e28ff30 (diff)
downloadbootstrap-d1872b4c98f26b1bfcd7e007133b97e6602dd0d0.tar.xz
bootstrap-d1872b4c98f26b1bfcd7e007133b97e6602dd0d0.zip
Merge branch 'master' into pr/13736
Conflicts: dist/css/bootstrap.css.map dist/css/bootstrap.min.css
Diffstat (limited to 'less/forms.less')
-rw-r--r--less/forms.less24
1 files changed, 20 insertions, 4 deletions
diff --git a/less/forms.less b/less/forms.less
index cb8a74fa1..b678d44fc 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -247,19 +247,35 @@ input[type="month"] {
}
// Apply same disabled cursor tweak as for inputs
+// Some special care is needed because <label>s don't inherit their parent's `cursor`.
//
// Note: Neither radios nor checkboxes can be readonly.
input[type="radio"],
-input[type="checkbox"],
-.radio,
+input[type="checkbox"] {
+ &[disabled],
+ &.disabled,
+ fieldset[disabled] & {
+ cursor: not-allowed;
+ }
+}
+// These classes are used directly on <label>s
.radio-inline,
-.checkbox,
.checkbox-inline {
- &[disabled],
+ &.disabled,
fieldset[disabled] & {
cursor: not-allowed;
}
}
+// These classes are used on elements with <label> descendants
+.radio,
+.checkbox {
+ &.disabled,
+ fieldset[disabled] & {
+ label {
+ cursor: not-allowed;
+ }
+ }
+}
// Form control sizing