Commit 739bf379 authored by Chris Rebert's avatar Chris Rebert

set not-allowed cursor on disabled radio+checkbox labels; fixes #13281

[skip validator] [skip sauce]
parent ef436c76
...@@ -2440,18 +2440,24 @@ input[type="month"].input-lg { ...@@ -2440,18 +2440,24 @@ input[type="month"].input-lg {
} }
input[type="radio"][disabled], input[type="radio"][disabled],
input[type="checkbox"][disabled], input[type="checkbox"][disabled],
.radio[disabled], input[type="radio"].disabled,
.radio-inline[disabled], input[type="checkbox"].disabled,
.checkbox[disabled],
.checkbox-inline[disabled],
fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="radio"],
fieldset[disabled] input[type="checkbox"], fieldset[disabled] input[type="checkbox"] {
fieldset[disabled] .radio, cursor: not-allowed;
}
.radio-inline.disabled,
.checkbox-inline.disabled,
fieldset[disabled] .radio-inline, fieldset[disabled] .radio-inline,
fieldset[disabled] .checkbox,
fieldset[disabled] .checkbox-inline { fieldset[disabled] .checkbox-inline {
cursor: not-allowed; cursor: not-allowed;
} }
.radio.disabled label,
.checkbox.disabled label,
fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label {
cursor: not-allowed;
}
.input-sm { .input-sm {
height: 30px; height: 30px;
padding: 5px 10px; padding: 5px 10px;
......
...@@ -247,19 +247,35 @@ input[type="month"] { ...@@ -247,19 +247,35 @@ input[type="month"] {
} }
// Apply same disabled cursor tweak as for inputs // 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. // Note: Neither radios nor checkboxes can be readonly.
input[type="radio"], input[type="radio"],
input[type="checkbox"], input[type="checkbox"] {
.radio, &[disabled],
&.disabled,
fieldset[disabled] & {
cursor: not-allowed;
}
}
// These classes are used directly on <label>s
.radio-inline, .radio-inline,
.checkbox,
.checkbox-inline { .checkbox-inline {
&[disabled], &.disabled,
fieldset[disabled] & { fieldset[disabled] & {
cursor: not-allowed; cursor: not-allowed;
} }
} }
// These classes are used on elements with <label> descendants
.radio,
.checkbox {
&.disabled,
fieldset[disabled] & {
label {
cursor: not-allowed;
}
}
}
// Form control sizing // Form control sizing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment