mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-02 14:24:19 +01:00
Merge pull request #9578 from twbs/cursor-not-allowed-disabled-btn-checkbox-radio
fixes #9511; set cursor:not-allowed for disabled buttons,checkboxes,radios
This commit is contained in:
commit
a58bf08360
13
dist/css/bootstrap.css
vendored
13
dist/css/bootstrap.css
vendored
@ -1711,6 +1711,17 @@ textarea.form-control {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.radio[disabled],
|
||||||
|
.radio-inline[disabled],
|
||||||
|
.checkbox[disabled],
|
||||||
|
.checkbox-inline[disabled],
|
||||||
|
fieldset[disabled] .radio,
|
||||||
|
fieldset[disabled] .radio-inline,
|
||||||
|
fieldset[disabled] .checkbox,
|
||||||
|
fieldset[disabled] .checkbox-inline {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
.input-sm {
|
.input-sm {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
@ -1936,7 +1947,7 @@ textarea.input-lg {
|
|||||||
.btn[disabled],
|
.btn[disabled],
|
||||||
fieldset[disabled] .btn {
|
fieldset[disabled] .btn {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
cursor: default;
|
cursor: not-allowed;
|
||||||
opacity: 0.65;
|
opacity: 0.65;
|
||||||
filter: alpha(opacity=65);
|
filter: alpha(opacity=65);
|
||||||
-webkit-box-shadow: none;
|
-webkit-box-shadow: none;
|
||||||
|
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -41,7 +41,7 @@
|
|||||||
&.disabled,
|
&.disabled,
|
||||||
&[disabled],
|
&[disabled],
|
||||||
fieldset[disabled] & {
|
fieldset[disabled] & {
|
||||||
cursor: default;
|
cursor: not-allowed;
|
||||||
pointer-events: none; // Future-proof disabling of clicks
|
pointer-events: none; // Future-proof disabling of clicks
|
||||||
.opacity(.65);
|
.opacity(.65);
|
||||||
.box-shadow(none);
|
.box-shadow(none);
|
||||||
|
@ -133,7 +133,7 @@ input[type="number"] {
|
|||||||
.form-control-focus();
|
.form-control-focus();
|
||||||
|
|
||||||
// Disabled and read-only inputs
|
// 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,
|
// disabled if the fieldset is disabled. Due to implementation difficulty,
|
||||||
// we don't honor that edge case; we style them as disabled anyway.
|
// we don't honor that edge case; we style them as disabled anyway.
|
||||||
&[disabled],
|
&[disabled],
|
||||||
@ -207,6 +207,20 @@ input[type="number"] {
|
|||||||
margin-left: 10px; // space out consecutive inline controls
|
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
|
// Form control sizing
|
||||||
.input-sm {
|
.input-sm {
|
||||||
|
Loading…
Reference in New Issue
Block a user