diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index e8c2b1fc20..83fec25aeb 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1127,7 +1127,10 @@ select[disabled], textarea[disabled], input[readonly], select[readonly], -textarea[readonly] { +textarea[readonly], +fieldset[disabled] input, +fieldset[disabled] select, +fieldset[disabled] textarea { cursor: not-allowed; background-color: #eeeeee; } @@ -1135,7 +1138,9 @@ textarea[readonly] { input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], -input[type="checkbox"][readonly] { +input[type="checkbox"][readonly], +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { background-color: transparent; } @@ -2583,7 +2588,8 @@ button.close { } .btn.disabled, -.btn[disabled] { +.btn[disabled], +fieldset[disabled] .btn { cursor: default; opacity: 0.65; filter: alpha(opacity=65); @@ -2753,7 +2759,8 @@ input[type="button"].btn-block { .btn-link, .btn-link:active, -.btn-link[disabled] { +.btn-link[disabled], +fieldset[disabled] .btn-link { background-color: transparent; background-image: none; -webkit-box-shadow: none; @@ -2773,7 +2780,8 @@ input[type="button"].btn-block { background-color: transparent; } -.btn-link[disabled]:hover { +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover { color: #333333; text-decoration: none; } diff --git a/docs/css.html b/docs/css.html index fdf1fe5958..3ad55d0803 100644 --- a/docs/css.html +++ b/docs/css.html @@ -1649,6 +1649,44 @@ For example, <code><section></code> should be wrapped as inlin <input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled> +
Add the disabled
attribute on a fieldset
to disable all the controls within the fieldset at once.
+<form class="form-inline"> + <fieldset disabled> + <input type="text" class="span4" placeholder="These controls are all disabled just"> + <select class="span4"> + <option>by being under a disabled fieldset</option> + </select> + <div class="checkbox"> + <label> + <input type="checkbox"> Can't check this + </label> + </div> + <button type="submit" class="btn btn-primary">Submit</button> + </fieldset> +</form> ++
+ Heads up!
+ Contrary to the HTML5 spec, form controls within a fieldset
's legend
will also be disabled.
+ Also, <a>
buttons within a fieldset[disabled]
will be styled like they each had the .disabled
class, but this only affects aesthetics; you must use custom JavaScript to actually make such links non-functional.
+
Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding .control-group
.
Add the disabled
attribute on a fieldset
to disable all the controls within the fieldset at once.
+<form class="form-inline"> + <fieldset disabled> + <input type="text" class="span4" placeholder="These controls are all disabled just"> + <select class="span4"> + <option>by being under a disabled fieldset</option> + </select> + <div class="checkbox"> + <label> + <input type="checkbox"> Can't check this + </label> + </div> + <button type="submit" class="btn btn-primary">Submit</button> + </fieldset> +</form> ++
+ Heads up!
+ Contrary to the HTML5 spec, form controls within a fieldset
's legend
will also be disabled.
+ Also, <a>
buttons within a fieldset[disabled]
will be styled like they each had the .disabled
class, but this only affects aesthetics; you must use custom JavaScript to actually make such links non-functional.
+
Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding .control-group
.