diff --git a/dist/css/bootstrap.css b/dist/css/bootstrap.css index b172acc5b2..87855926dc 100644 --- a/dist/css/bootstrap.css +++ b/dist/css/bootstrap.css @@ -2440,18 +2440,24 @@ input[type="month"].input-lg { } input[type="radio"][disabled], input[type="checkbox"][disabled], -.radio[disabled], -.radio-inline[disabled], -.checkbox[disabled], -.checkbox-inline[disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, fieldset[disabled] input[type="radio"], -fieldset[disabled] input[type="checkbox"], -fieldset[disabled] .radio, +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, fieldset[disabled] .radio-inline, -fieldset[disabled] .checkbox, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} .input-sm { height: 30px; padding: 5px 10px; diff --git a/docs/_includes/css/forms.html b/docs/_includes/css/forms.html index f2e29d6ff3..95bb29c593 100644 --- a/docs/_includes/css/forms.html +++ b/docs/_includes/css/forms.html @@ -207,7 +207,8 @@ {% endhighlight %}

Checkboxes and radios

-

Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.

+

Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.

+

A checkbox or radio with the disabled attribute will be styled appropriately. To have the <label> for the checkbox or radio also display a "not-allowed" cursor when the user hovers over the label, add the .disabled class to your .radio, .radio-inline, .checkbox, .checkbox-inline, or <fieldset>.

Default (stacked)

@@ -217,6 +218,12 @@ Option one is this and that—be sure to include why it's great
+
+ +

+
+ +
{% highlight html %} @@ -239,6 +252,12 @@ Option one is this and that—be sure to include why it's great +
+ +
+
+ +
{% endhighlight %}

Inline checkboxes and radios

diff --git a/less/forms.less b/less/forms.less index cb8a74fa1f..b678d44fc2 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