]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Rename .form-control-static to .form-control-readonly-plain
authorPatrick H. Lauke <redux@splintered.co.uk>
Thu, 27 Apr 2017 23:35:55 +0000 (00:35 +0100)
committerMark Otto <markdotto@gmail.com>
Thu, 15 Jun 2017 02:51:50 +0000 (19:51 -0700)
docs/4.0/components/forms.md
scss/_forms.scss

index 2bc4a91cb60f448d9bee7c2ca703db941a94299c..0a5756c4d62294abc2428fd5137192283f77342e 100644 (file)
@@ -115,16 +115,16 @@ Add the `readonly` boolean attribute on an input to prevent modification of the
 <input class="form-control" type="text" placeholder="Readonly input here…" readonly>
 {% endexample %}
 
-### Static
+### Readonly plain text
 
-If you want to have read-only fields in your form styled as plain text, use the `.form-control-static` class to remove the default form field styling and preserve the correct margin and padding.
+If you want to have `<input readonly>` elements in your form styled as plain text, use the `.form-control-plaintext` class to remove the default form field styling and preserve the correct margin and padding.
 
 {% example html %}
 <form>
   <div class="form-group row">
     <label for="staticEmail" class="col-sm-2 col-form-label">Email</label>
     <div class="col-sm-10">
-      <input type="text" readonly class="form-control-static" id="staticEmail" value="email@example.com">
+      <input type="text" readonly class="form-control-plaintext" id="staticEmail" value="email@example.com">
     </div>
   </div>
   <div class="form-group row">
@@ -140,7 +140,7 @@ If you want to have read-only fields in your form styled as plain text, use the
 <form class="form-inline">
   <div class="form-group">
     <label for="staticEmail2" class="sr-only">Email</label>
-    <input type="text" readonly class="form-control-static" id="staticEmail2" value="email@example.com">
+    <input type="text" readonly class="form-control-plaintext" id="staticEmail2" value="email@example.com">
   </div>
   <div class="form-group mx-sm-3">
     <label for="inputPassword2" class="sr-only">Password</label>
index 89766563cd6b7d04d5f822eb1c93b79ba01daf05..ecf0a3df176e85c531b8d604581b336e50441907 100644 (file)
@@ -122,12 +122,12 @@ select.form-control {
 }
 
 
-// Static form control text
+// Readonly controls as plain text
 //
-// Apply class to an element to make any string of text align with labels in a
-// horizontal form layout.
+// Apply class to a readonly input to make it appear like regular plain
+// text (without any border, background color, focus indicator)
 
-.form-control-static {
+.form-control-plaintext {
   padding-top: $input-btn-padding-y;
   padding-bottom: $input-btn-padding-y;
   margin-bottom: 0; // match inputs if this class comes on inputs with default margins