]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Alternate fix to #17965: Updates to use the new class name and adds some basic docs...
authorMark Otto <markdotto@gmail.com>
Tue, 9 Feb 2016 07:21:32 +0000 (23:21 -0800)
committerMark Otto <markdotto@gmail.com>
Tue, 9 Feb 2016 07:21:32 +0000 (23:21 -0800)
docs/components/forms.md
scss/mixins/_forms.scss

index 134bd88c1933971f7592984d5c75d216546c6582..6f95ecb3d865980dbe1485aeed33ddd6f68fc650 100644 (file)
@@ -762,6 +762,33 @@ Custom checkboxes and radios can also be disabled. Add the `disabled` boolean at
 </label>
 {% endexample %}
 
+#### Validation states
+
+Add other states to your custom forms with our validation classes.
+
+{% example html %}
+<div class="form-group has-success">
+  <label class="custom-control custom-checkbox">
+    <input type="checkbox" class="custom-control-input">
+    <span class="custom-control-indicator"></span>
+    <span class="custom-control-description">Check this custom checkbox</span>
+  </label>
+</div>
+<div class="form-group has-warning">
+  <label class="custom-control custom-checkbox">
+    <input type="checkbox" class="custom-control-input">
+    <span class="custom-control-indicator"></span>
+    <span class="custom-control-description">Check this custom checkbox</span>
+  </label>
+</div>
+<div class="form-group has-danger m-b-0">
+  <label class="custom-control custom-checkbox">
+    <input type="checkbox" class="custom-control-input">
+    <span class="custom-control-indicator"></span>
+    <span class="custom-control-description">Check this custom checkbox</span>
+  </label>
+</div>
+{% endexample %}
 
 #### Stacked
 
index b87429c1b0798f67ee90aa9dafb554d9e5a716ca..fde8295314a3b0c9840d8c4f6ac8a8652a5dd89b 100644 (file)
@@ -14,7 +14,8 @@
   &.radio label,
   &.checkbox label,
   &.radio-inline label,
-  &.checkbox-inline label  {
+  &.checkbox-inline label,
+  .custom-control {
     color: $color;
   }
   // Set the border and box shadow on specific inputs to match