]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
rework some copy
authorMark Otto <markdotto@gmail.com>
Fri, 28 Oct 2016 23:36:09 +0000 (16:36 -0700)
committerMark Otto <markdotto@gmail.com>
Fri, 28 Oct 2016 23:36:09 +0000 (16:36 -0700)
docs/components/forms.md

index 040f4f7e5e8eea28f19aa406d27802ac653b073c..cf5a8473e7a4846ce15344a5006ee3627c45a6c5 100644 (file)
@@ -682,7 +682,11 @@ Inline text can use any typical inline HTML element (be it a `<small>`, `<span>`
 
 ## Validation
 
-Bootstrap includes validation styles for danger, warning, and success states on form controls. Here's a rundown of how they work:
+Bootstrap includes validation styles for danger, warning, and success states on most form controls.
+
+### How it works
+
+Here's a rundown of how they work:
 
 - To use, add `.has-warning`, `.has-danger`, or `.has-success` to the parent element. Any `.col-form-label`, `.form-control`, or custom form element will receive the validation styles.
 - Contextual validation text, in addition to your usual form field help text, can be added with the use of `.form-control-feedback`. This text will adapt to the parent `.has-*` class. By default it only includes a bit of `margin` for spacing and a modified `color` for each state.
@@ -690,14 +694,14 @@ Bootstrap includes validation styles for danger, warning, and success states on
 - You may use your own base64 PNGs or SVGs by updating the Sass variables and recompiling.
 - Icons can also be disabled entirely by setting the variables to `none` or commenting out the source Sass.
 
+### Defining states
+
 Generally speaking, you'll want to use a particular state for specific types of feedback:
 
 - **Danger** is great for when there's a blocking or required field. A user *must* fill in this field properly to submit the form.
 - **Warning** works well for input values that are in progress, like password strength, or soft validation before a user attempts to submit a form.
 - And lastly, **success** is ideal for situations when you have per-field validation throughout a form and want to encourage a user through the rest of the fields.
 
-Here are some examples of the aforementioned classes in action.
-
 {% comment %}
 {% callout warning %}
 #### Conveying validation state to assistive technologies and colorblind users
@@ -708,6 +712,10 @@ Ensure that an alternative indication of state is also provided. For instance, y
 {% endcallout %}
 {% endcomment %}
 
+### Examples
+
+Here are some examples of the aforementioned classes in action. First up is your standard left-aligned fields with labels, help text, and validation messaging.
+
 {% example html %}
 <div class="form-group has-success">
   <label class="form-control-label" for="inputSuccess1">Input with success</label>