aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-06-08 11:19:35 -0700
committerMark Otto <[email protected]>2014-06-08 11:19:35 -0700
commit34891de173f1ea1dfd470d4cdeed52f83d9a253b (patch)
treea7cb7aaf85bdfce5e1f0a8165879193c327179b6 /less/forms.less
parentd66b65ddde1b2f1a5cb14f601d30c552c79d7626 (diff)
parent1e3b93804fa88d247d8708529fb44b28d73fd91f (diff)
downloadbootstrap-34891de173f1ea1dfd470d4cdeed52f83d9a253b.tar.xz
bootstrap-34891de173f1ea1dfd470d4cdeed52f83d9a253b.zip
grunt
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