0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

add appended input example to docs, fix help-text wrapping issue by clearing float

This commit is contained in:
Mark Otto 2011-12-27 17:04:55 -06:00
parent 550879cf66
commit 53c6dbff0d
5 changed files with 34 additions and 14 deletions

24
bootstrap.css vendored
View File

@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Tue Dec 27 16:25:12 CST 2011
* Date: Tue Dec 27 17:02:48 CST 2011
*/
html, body {
margin: 0;
@ -491,7 +491,7 @@ address {
}
code, pre {
padding: 0 3px 2px;
font-family: "Menlo", Monaco, Courier New, monospace;
font-family: Menlo, Monaco, Courier New, monospace;
font-size: 12px;
color: #404040;
-webkit-border-radius: 3px;
@ -905,6 +905,21 @@ textarea[readonly] {
display: block;
max-width: 600px;
}
.input-prepend, .input-append {
zoom: 1;
}
.input-prepend:before,
.input-append:before,
.input-prepend:after,
.input-append:after {
display: table;
*display: inline;
content: "";
zoom: 1;
}
.input-prepend:after, .input-append:after {
clear: both;
}
.input-prepend input, .input-append input {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
@ -985,7 +1000,7 @@ th, td {
padding: 8px;
line-height: 18px;
text-align: left;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
th {
font-weight: bold;
@ -994,9 +1009,6 @@ th {
td {
vertical-align: top;
}
tbody tr:last-child th, tbody tr:last-child td {
border-bottom: 0;
}
.condensed-table th, .condensed-table td {
padding: 4px 5px;
}

7
bootstrap.min.css vendored
View File

@ -87,7 +87,7 @@ blockquote{padding-left:15px;margin-bottom:18px;border-left:5px solid #eee;}bloc
blockquote small{display:block;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
blockquote.pull-right{float:right;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
address{display:block;margin-bottom:18px;line-height:18px;}
code,pre{padding:0 3px 2px;font-family:"Menlo",Monaco,Courier New,monospace;font-size:12px;color:#404040;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
code,pre{padding:0 3px 2px;font-family:Menlo, Monaco, Courier New, monospace;font-size:12px;color:#404040;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
code{padding:1px 3px;background-color:#fee9cc;}
pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-break:break-all;}pre.prettyprint{margin-bottom:18px;}
pre code{padding:0;background-color:transparent;}
@ -146,6 +146,8 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado
.help-text{margin-top:5px;margin-bottom:0;color:#bfbfbf;}
.help-inline{*position:relative;*top:-5px;display:inline;padding-left:5px;}
.help-block{display:block;max-width:600px;}
.input-prepend,.input-append{zoom:1;}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;*display:inline;content:"";zoom:1;}
.input-prepend:after,.input-append:after{clear:both;}
.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
.input-prepend .add-on,.input-append .add-on{float:left;display:block;width:auto;min-width:16px;height:18px;margin-right:-1px;padding:4px 4px 4px 5px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
@ -160,10 +162,9 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado
.horizontal-form .control-list{padding-top:6px;}
.horizontal-form .form-actions{padding-left:150px;}
table{width:100%;margin-bottom:18px;}
th,td{padding:8px;line-height:18px;text-align:left;border-bottom:1px solid #ddd;}
th,td{padding:8px;line-height:18px;text-align:left;border-top:1px solid #ddd;}
th{font-weight:bold;vertical-align:bottom;}
td{vertical-align:top;}
tbody tr:last-child th,tbody tr:last-child td{border-bottom:0;}
.condensed-table th,.condensed-table td{padding:4px 5px;}
.bordered-table{border:1px solid #ddd;border-collapse:separate;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td,.bordered-table td+th{border-left:1px solid #ddd;}
.bordered-table thead:first-child tr:first-child th:first-child,.bordered-table tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}

View File

@ -896,6 +896,16 @@ Form states
<p class="help-block">Here's some help text</p>
</div>
</fieldset>
<fieldset class="control-group">
<label class="control-label" for="appendedInput">Appended text</label>
<div class="controls">
<div class="input-append">
<input class="input-small" id="appendedInput" name="appendedInput" size="16" type="text">
<span class="add-on">.00</span>
</div>
<p class="help-block">Here's more help text</p>
</div>
</fieldset>
<fieldset class="control-group">
<label class="control-label" for="select01">Select list</label>
<div class="controls">

View File

@ -306,6 +306,7 @@ textarea[readonly] {
// Allow us to put symbols and text within the input field for a cleaner look
.input-prepend,
.input-append {
.clearfix(); // Clear the float to prevent wrapping
input {
.border-radius(0 3px 3px 0);
}

View File

@ -17,7 +17,7 @@ td {
padding: 8px;
line-height: @baseLineHeight;
text-align: left;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
th {
font-weight: bold;
@ -26,10 +26,6 @@ th {
td {
vertical-align: top;
}
tbody tr:last-child th,
tbody tr:last-child td {
border-bottom: 0;
}
// CONDENSED TABLE W/ HALF PADDING