aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2013-08-14 18:20:28 -0700
committerChris Rebert <[email protected]>2013-08-14 18:20:28 -0700
commite684758b55dbfe1e18f3e3aa4d5eddcfaf1bd010 (patch)
tree05942e26a1fbdc2adf44419cd551c7d7d058e4f7 /less/forms.less
parenta9d6b7ee0b4dd7b109daabd586d6198898816dd0 (diff)
downloadbootstrap-e684758b55dbfe1e18f3e3aa4d5eddcfaf1bd010.tar.xz
bootstrap-e684758b55dbfe1e18f3e3aa4d5eddcfaf1bd010.zip
fixes #9511; set cursor:not-allowed for disabled buttons,checkboxes,radios
Diffstat (limited to 'less/forms.less')
-rw-r--r--less/forms.less16
1 files changed, 15 insertions, 1 deletions
diff --git a/less/forms.less b/less/forms.less
index a8847be2b..adcb0dc32 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -133,7 +133,7 @@ input[type="number"] {
.form-control-focus();
// Disabled and read-only inputs
- // Note: HTML5 says that inputs under a fieldset > legend:first-child won't be
+ // Note: HTML5 says that controls under a fieldset > legend:first-child won't be
// disabled if the fieldset is disabled. Due to implementation difficulty,
// we don't honor that edge case; we style them as disabled anyway.
&[disabled],
@@ -207,6 +207,20 @@ input[type="number"] {
margin-left: 10px; // space out consecutive inline controls
}
+// Apply same disabled cursor tweak as for inputs
+// Note: HTML5 says that controls under a fieldset > legend:first-child won't be
+// disabled if the fieldset is disabled. Due to implementation difficulty,
+// we don't honor that edge case; we style them as disabled anyway.
+// Note: Neither radios nor checkboxes can be readonly.
+.radio,
+.radio-inline,
+.checkbox,
+.checkbox-inline {
+ &[disabled],
+ fieldset[disabled] & {
+ cursor: not-allowed;
+ }
+}
// Form control sizing
.input-sm {