diff options
| author | Mark Otto <[email protected]> | 2012-09-25 22:16:47 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-09-25 22:16:47 -0700 |
| commit | 9e97098802d969d338fdb6c553cf6cee903c8663 (patch) | |
| tree | 7ac66b68cf524b0c6c419a428af3bb007e759802 | |
| parent | 0220015edd1c06e0475a346ca5882e3b1758af48 (diff) | |
| download | bootstrap-9e97098802d969d338fdb6c553cf6cee903c8663.tar.xz bootstrap-9e97098802d969d338fdb6c553cf6cee903c8663.zip | |
make .input-* classes match .btn-* size classes
| -rw-r--r-- | docs/assets/css/bootstrap.css | 86 | ||||
| -rw-r--r-- | docs/base-css.html | 22 | ||||
| -rw-r--r-- | docs/templates/pages/base-css.mustache | 22 | ||||
| -rw-r--r-- | less/forms.less | 42 |
4 files changed, 117 insertions, 55 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 8fa518607..232cb9bf0 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -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"], diff --git a/docs/base-css.html b/docs/base-css.html index a2ecf613a..3c218e68f 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -1336,30 +1336,22 @@ For example, <code><section></code> 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"> -<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"> </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"> diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 82d65999d..e48cdb8bb 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -1273,30 +1273,22 @@ <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"> -<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"> </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"> diff --git a/less/forms.less b/less/forms.less index d5c032b84..0d1598995 100644 --- a/less/forms.less +++ b/less/forms.less @@ -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); + } +} |
