]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
make .input-* classes match .btn-* size classes
authorMark Otto <markotto@twitter.com>
Wed, 26 Sep 2012 05:16:47 +0000 (22:16 -0700)
committerMark Otto <markotto@twitter.com>
Wed, 26 Sep 2012 05:16:47 +0000 (22:16 -0700)
docs/assets/css/bootstrap.css
docs/base-css.html
docs/templates/pages/base-css.mustache
less/forms.less

index 8fa5186077a371808f7b444e2224a1a9e4bed66a..232cb9bf0eea2ef72def47e67051c5fad6193ca2 100644 (file)
@@ -952,28 +952,78 @@ textarea::-webkit-input-placeholder {
   margin-left: 10px;
 }
 
-.input-mini {
-  width: 60px;
-}
-
-.input-small {
-  width: 90px;
-}
-
-.input-medium {
-  width: 150px;
-}
-
-.input-large {
-  width: 210px;
+select.input-large,
+textarea.input-large,
+input[type="text"].input-large,
+input[type="password"].input-large,
+input[type="datetime"].input-large,
+input[type="datetime-local"].input-large,
+input[type="date"].input-large,
+input[type="month"].input-large,
+input[type="time"].input-large,
+input[type="week"].input-large,
+input[type="number"].input-large,
+input[type="email"].input-large,
+input[type="url"].input-large,
+input[type="search"].input-large,
+input[type="tel"].input-large,
+input[type="color"].input-large,
+.uneditable-input.input-large {
+  padding: 11px 19px;
+  padding-right: 14px;
+  padding-left: 14px;
+  font-size: 17.5px;
+  -webkit-border-radius: 5px;
+     -moz-border-radius: 5px;
+          border-radius: 5px;
 }
 
-.input-xlarge {
-  width: 270px;
+select.input-small,
+textarea.input-small,
+input[type="text"].input-small,
+input[type="password"].input-small,
+input[type="datetime"].input-small,
+input[type="datetime-local"].input-small,
+input[type="date"].input-small,
+input[type="month"].input-small,
+input[type="time"].input-small,
+input[type="week"].input-small,
+input[type="number"].input-small,
+input[type="email"].input-small,
+input[type="url"].input-small,
+input[type="search"].input-small,
+input[type="tel"].input-small,
+input[type="color"].input-small,
+.uneditable-input.input-small {
+  padding: 2px 10px;
+  font-size: 11.9px;
+  -webkit-border-radius: 3px;
+     -moz-border-radius: 3px;
+          border-radius: 3px;
 }
 
-.input-xxlarge {
-  width: 530px;
+select.input-mini,
+textarea.input-mini,
+input[type="text"].input-mini,
+input[type="password"].input-mini,
+input[type="datetime"].input-mini,
+input[type="datetime-local"].input-mini,
+input[type="date"].input-mini,
+input[type="month"].input-mini,
+input[type="time"].input-mini,
+input[type="week"].input-mini,
+input[type="number"].input-mini,
+input[type="email"].input-mini,
+input[type="url"].input-mini,
+input[type="search"].input-mini,
+input[type="tel"].input-mini,
+input[type="color"].input-mini,
+.uneditable-input.input-mini {
+  padding: 1px 6px;
+  font-size: 10.5px;
+  -webkit-border-radius: 3px;
+     -moz-border-radius: 3px;
+          border-radius: 3px;
 }
 
 input[class*="span"],
index a2ecf613a47a2a764c1ec177c64d696162f17a55..3c218e68f3088b10e91ec996425475925dd77fe0 100644 (file)
@@ -1336,30 +1336,22 @@ For example, &lt;code&gt;&lt;section&gt;&lt;/code&gt; should be wrapped as inlin
           <p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.</p>
 
           <h4>Relative sizing</h4>
+          <p>Create larger or smaller form controls that match button sizes.</p>
           <form class="bs-docs-example" style="padding-bottom: 15px;">
             <div class="controls docs-input-sizes">
-              <input class="input-mini" type="text" placeholder=".input-mini">
-              <input class="input-small" type="text" placeholder=".input-small">
-              <input class="input-medium" type="text" placeholder=".input-medium">
               <input class="input-large" type="text" placeholder=".input-large">
-              <input class="input-xlarge" type="text" placeholder=".input-xlarge">
-              <input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
+              <input class="input-small" type="text" placeholder=".input-small">
+              <input class="input-mini" type="text" placeholder=".input-mini">
             </div>
           </form>
 <pre class="prettyprint linenums">
-&lt;input class="input-mini" type="text" placeholder=".input-mini"&gt;
-&lt;input class="input-small" type="text" placeholder=".input-small"&gt;
-&lt;input class="input-medium" type="text" placeholder=".input-medium"&gt;
 &lt;input class="input-large" type="text" placeholder=".input-large"&gt;
-&lt;input class="input-xlarge" type="text" placeholder=".input-xlarge"&gt;
-&lt;input class="input-xxlarge" type="text" placeholder=".input-xxlarge"&gt;
+&lt;input class="input-small" type="text" placeholder=".input-small"&gt;
+&lt;input class="input-mini" type="text" placeholder=".input-mini"&gt;
 </pre>
-          <p>
-            <span class="label label-info">Heads up!</span> In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, <code>.input-large</code> will increase the padding and font-size of an input.
-          </p>
 
-          <h4>Grid sizing</h4>
-          <p>Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid columns.</p>
+          <h4>Column sizing</h4>
+          <p>Use <code>.span1</code> to <code>.span12</code> for setting widths on inputs that match Bootstrap's grid system.</p>
           <form class="bs-docs-example" style="padding-bottom: 15px;">
             <div class="controls docs-input-sizes">
               <input class="span1" type="text" placeholder=".span1">
index 82d65999d6d525bef14a9ca580347bd480cd2434..e48cdb8bb26f4bed40be243c925f1fda5a2c00e2 100644 (file)
           <p>{{_i}}Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.{{/i}}</p>
 
           <h4>{{_i}}Relative sizing{{/i}}</h4>
+          <p>{{_i}}Create larger or smaller form controls that match button sizes.{{/i}}</p>
           <form class="bs-docs-example" style="padding-bottom: 15px;">
             <div class="controls docs-input-sizes">
-              <input class="input-mini" type="text" placeholder=".input-mini">
-              <input class="input-small" type="text" placeholder=".input-small">
-              <input class="input-medium" type="text" placeholder=".input-medium">
               <input class="input-large" type="text" placeholder=".input-large">
-              <input class="input-xlarge" type="text" placeholder=".input-xlarge">
-              <input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
+              <input class="input-small" type="text" placeholder=".input-small">
+              <input class="input-mini" type="text" placeholder=".input-mini">
             </div>
           </form>
 <pre class="prettyprint linenums">
-&lt;input class="input-mini" type="text" placeholder=".input-mini"&gt;
-&lt;input class="input-small" type="text" placeholder=".input-small"&gt;
-&lt;input class="input-medium" type="text" placeholder=".input-medium"&gt;
 &lt;input class="input-large" type="text" placeholder=".input-large"&gt;
-&lt;input class="input-xlarge" type="text" placeholder=".input-xlarge"&gt;
-&lt;input class="input-xxlarge" type="text" placeholder=".input-xxlarge"&gt;
+&lt;input class="input-small" type="text" placeholder=".input-small"&gt;
+&lt;input class="input-mini" type="text" placeholder=".input-mini"&gt;
 </pre>
-          <p>
-            <span class="label label-info">{{_i}}Heads up!{{/i}}</span> In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, <code>.input-large</code> will increase the padding and font-size of an input.
-          </p>
 
-          <h4>{{_i}}Grid sizing{{/i}}</h4>
-          <p>{{_i}}Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid columns.{{/i}}</p>
+          <h4>{{_i}}Column sizing{{/i}}</h4>
+          <p>{{_i}}Use <code>.span1</code> to <code>.span12</code> for setting widths on inputs that match Bootstrap's grid system.{{/i}}</p>
           <form class="bs-docs-example" style="padding-bottom: 15px;">
             <div class="controls docs-input-sizes">
               <input class="span1" type="text" placeholder=".span1">
index d5c032b8407549774b85095ad61dc1a763c26245..0d1598995f01afb9bf8875a03a768a1403c2b26e 100644 (file)
@@ -256,13 +256,41 @@ textarea {
 // INPUT SIZES
 // -----------
 
-// General classes for quick sizes
-.input-mini       { width: 60px; }
-.input-small      { width: 90px; }
-.input-medium     { width: 150px; }
-.input-large      { width: 210px; }
-.input-xlarge     { width: 270px; }
-.input-xxlarge    { width: 530px; }
+select,
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  &.input-large {
+    padding: @paddingLarge;
+    padding-left: 14px;
+    padding-right: 14px; // TODO: Resolve this override
+    font-size: @fontSizeLarge;
+    .border-radius(@borderRadiusLarge);
+  }
+  &.input-small {
+    padding: @paddingSmall;
+    font-size: @fontSizeSmall;
+    .border-radius(@borderRadiusSmall);
+  }
+  &.input-mini {
+    padding: @paddingMini;
+    font-size: @fontSizeMini;
+    .border-radius(@borderRadiusSmall);
+  }
+}