diff options
| author | Mark Otto <[email protected]> | 2016-09-05 11:39:37 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-09-05 11:39:37 -0700 |
| commit | 7e18498b64a56dea2fccaa6e1cd61d6cbf700beb (patch) | |
| tree | 5c3c899317ab364ca7a0201a8fe8a3f28e93905e /docs | |
| parent | dc5c1421c6ee793bb8b5feced401472de806c70c (diff) | |
| download | bootstrap-7e18498b64a56dea2fccaa6e1cd61d6cbf700beb.tar.xz bootstrap-7e18498b64a56dea2fccaa6e1cd61d6cbf700beb.zip | |
Fixes #20608 and #20578: Consistent checkbox and radio markup (#20629)
- Update docs examples to use newer .form-check suite of classes
- Update form validation mixin to use newer classes as well
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/components/forms.md | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/docs/components/forms.md b/docs/components/forms.md index fcacd461e..09d0d4f8f 100644 --- a/docs/components/forms.md +++ b/docs/components/forms.md @@ -59,28 +59,29 @@ Remember, since Bootstrap utilizes the HTML5 doctype, **all inputs must have a ` </div> <fieldset class="form-group"> <legend>Radio buttons</legend> - <div class="radio"> - <label> - <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked> + <div class="form-check"> + <label class="form-check-label"> + <input type="radio" class="form-check-input" name="optionsRadios" id="optionsRadios1" value="option1" checked> Option one is this and that—be sure to include why it's great </label> </div> - <div class="radio"> - <label> - <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"> + <div class="form-check"> + <label class="form-check-label"> + <input type="radio" class="form-check-input" name="optionsRadios" id="optionsRadios2" value="option2"> Option two can be something else and selecting it will deselect option one </label> </div> - <div class="radio disabled"> - <label> - <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled> + <div class="form-check disabled"> + <label class="form-check-label"> + <input type="radio" class="form-check-input" name="optionsRadios" id="optionsRadios3" value="option3" disabled> Option three is disabled </label> </div> </fieldset> - <div class="checkbox"> - <label> - <input type="checkbox"> Check me out + <div class="form-check"> + <label class="form-check-label"> + <input type="checkbox" class="form-check-input"> + Check me out </label> </div> <button type="submit" class="btn btn-primary">Submit</button> @@ -150,10 +151,8 @@ Below is a complete list of the specific form controls supported by Bootstrap an <tr> <td class="text-nowrap"> {% markdown %} -`.radio`<br> -`.radio-inline`<br> -`.checkbox`<br> -`.checkbox-inline` +`.form-check`<br> +`.form-check-inline` {% endmarkdown %} </td> <td class="text-nowrap"> @@ -730,21 +729,21 @@ Ensure that an alternative indication of state is also provided. For instance, y {% endexample %} {% example html %} -<div class="checkbox has-success"> - <label> - <input type="checkbox" id="checkboxSuccess" value="option1"> +<div class="form-check has-success"> + <label class="form-check-label"> + <input type="checkbox" class="form-check-input" id="checkboxSuccess" value="option1"> Checkbox with success </label> </div> -<div class="checkbox has-warning"> - <label> - <input type="checkbox" id="checkboxWarning" value="option1"> +<div class="form-check has-warning"> + <label class="form-check-label"> + <input type="checkbox" class="form-check-input" id="checkboxWarning" value="option1"> Checkbox with warning </label> </div> -<div class="checkbox has-danger"> - <label> - <input type="checkbox" id="checkboxDanger" value="option1"> +<div class="form-check has-danger"> + <label class="form-check-label"> + <input type="checkbox" class="form-check-input" id="checkboxDanger" value="option1"> Checkbox with danger </label> </div> |
