style-guide 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +3 -2
- data/app/assets/stylesheets/style_guide/example.css +55 -6
- data/app/assets/stylesheets/style_guide/header.css +5 -5
- data/app/assets/stylesheets/style_guide/layout.css +3 -33
- data/app/assets/stylesheets/style_guide/navbar.css +25 -22
- data/app/assets/stylesheets/style_guide/sidebar.css +2 -0
- data/app/views/layouts/style_guide/application.html.erb +1 -1
- data/app/views/style_guide/{partials/_button_disabled_state.erb → bootstrap_base/_button:_disabled_anchor.erb} +0 -0
- data/app/views/style_guide/{partials/_button_element.erb → bootstrap_base/_button:_disabled_element.erb} +0 -0
- data/app/views/style_guide/{partials → bootstrap_base}/_button_sizes.erb +0 -0
- data/app/views/style_guide/{partials/_buttons.erb → bootstrap_base/_button_types.erb} +0 -0
- data/app/views/style_guide/bootstrap_base/_code:_blocks.erb +8 -0
- data/app/views/style_guide/{partials/_code_inline.erb → bootstrap_base/_code:_inline.erb} +0 -0
- data/app/views/style_guide/bootstrap_base/_form_controls:_checkbox_and_radio.erb +13 -0
- data/app/views/style_guide/bootstrap_base/_form_controls:_input.erb +1 -0
- data/app/views/style_guide/bootstrap_base/_form_controls:_select.erb +15 -0
- data/app/views/style_guide/bootstrap_base/_form_controls:_textarea.erb +1 -0
- data/app/views/style_guide/bootstrap_base/_forms:_default_styles.erb +12 -0
- data/app/views/style_guide/bootstrap_base/_forms:_horizontal.erb +22 -0
- data/app/views/style_guide/bootstrap_base/_forms:_inline.erb +8 -0
- data/app/views/style_guide/bootstrap_base/_forms:_search.erb +4 -0
- data/app/views/style_guide/bootstrap_base/_images.erb +136 -0
- data/app/views/style_guide/{partials → bootstrap_base}/_tables.erb +0 -0
- data/app/views/style_guide/{partials → bootstrap_base}/_typography.erb +0 -0
- data/app/views/style_guide/style/_example.erb +10 -0
- data/app/views/style_guide/style/show.html.erb +1 -6
- data/config/locales/en.yml +57 -0
- data/lib/style_guide/config.rb +1 -1
- data/lib/style_guide/engine.rb +2 -0
- data/lib/style_guide/section.rb +1 -1
- data/lib/style_guide/version.rb +1 -1
- data/spec/dummy/app/assets/stylesheets/application.css +0 -37
- data/spec/dummy/app/assets/stylesheets/swatches.css +26 -1
- data/spec/dummy/app/assets/stylesheets/three_dee.css +4 -0
- data/spec/dummy/app/views/styles/_00swatches.erb +8 -8
- data/spec/dummy/app/views/styles/_three_dee.erb +1 -0
- data/spec/dummy/config/locales/en.yml +6 -4
- data/spec/lib/style_guide/config_spec.rb +1 -1
- data/spec/lib/style_guide/section_spec.rb +3 -3
- data/style-guide.gemspec +1 -0
- metadata +41 -16
- data/app/assets/stylesheets/docs.css +0 -153
- data/app/assets/stylesheets/responsive.css +0 -164
- data/app/views/style_guide/partials/_code_blocks.erb +0 -12
- data/app/views/style_guide/partials/_forms.erb +0 -714
- data/app/views/style_guide/partials/_images.erb +0 -318
- data/spec/dummy/app/views/styles/_info-header.erb +0 -1
@@ -1,164 +0,0 @@
|
|
1
|
-
@media (min-width: 1200px) {
|
2
|
-
.bs-docs-container {
|
3
|
-
max-width: 970px;
|
4
|
-
}
|
5
|
-
.bs-docs-sidenav {
|
6
|
-
width: 258px;
|
7
|
-
}
|
8
|
-
.bs-docs-sidenav > li > a {
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
@media (max-width: 980px) {
|
13
|
-
body > .navbar-fixed-top .brand {
|
14
|
-
float: left;
|
15
|
-
margin-left: 0;
|
16
|
-
padding-left: 10px;
|
17
|
-
padding-right: 10px;
|
18
|
-
}
|
19
|
-
|
20
|
-
.quick-links li {
|
21
|
-
display: inline-block;
|
22
|
-
margin: 5px;
|
23
|
-
}
|
24
|
-
|
25
|
-
.bs-docs-sidenav {
|
26
|
-
top: 0;
|
27
|
-
margin-top: 30px;
|
28
|
-
margin-right: 0;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
@media (min-width: 768px) and (max-width: 980px) {
|
33
|
-
body {
|
34
|
-
padding-top: 0;
|
35
|
-
}
|
36
|
-
.jumbotron {
|
37
|
-
}
|
38
|
-
.bs-docs-sidenav {
|
39
|
-
width: 166px;
|
40
|
-
margin-top: 20px;
|
41
|
-
}
|
42
|
-
.bs-docs-sidenav.affix {
|
43
|
-
top: 0;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
@media (max-width: 767px) {
|
48
|
-
body {
|
49
|
-
padding-top: 0;
|
50
|
-
}
|
51
|
-
|
52
|
-
.jumbotron {
|
53
|
-
padding: 40px 20px;
|
54
|
-
margin-right: -20px;
|
55
|
-
margin-left: -20px;
|
56
|
-
}
|
57
|
-
.masthead h1 {
|
58
|
-
font-size: 90px;
|
59
|
-
}
|
60
|
-
.masthead p,
|
61
|
-
.masthead .btn {
|
62
|
-
font-size: 24px;
|
63
|
-
}
|
64
|
-
.marketing .span4 {
|
65
|
-
margin-bottom: 40px;
|
66
|
-
}
|
67
|
-
.bs-docs-social {
|
68
|
-
margin: 0 -20px;
|
69
|
-
}
|
70
|
-
|
71
|
-
.show-grid [class*="span"] {
|
72
|
-
margin-bottom: 5px;
|
73
|
-
}
|
74
|
-
|
75
|
-
.bs-docs-sidenav {
|
76
|
-
width: auto;
|
77
|
-
margin-bottom: 20px;
|
78
|
-
}
|
79
|
-
.bs-docs-sidenav.affix {
|
80
|
-
position: static;
|
81
|
-
width: auto;
|
82
|
-
top: 0;
|
83
|
-
}
|
84
|
-
|
85
|
-
.footer {
|
86
|
-
margin-left: -20px;
|
87
|
-
margin-right: -20px;
|
88
|
-
padding-left: 20px;
|
89
|
-
padding-right: 20px;
|
90
|
-
}
|
91
|
-
.footer p {
|
92
|
-
margin-bottom: 9px;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
|
96
|
-
@media (max-width: 480px) {
|
97
|
-
body {
|
98
|
-
padding-top: 0;
|
99
|
-
}
|
100
|
-
|
101
|
-
h2 small {
|
102
|
-
display: block;
|
103
|
-
}
|
104
|
-
|
105
|
-
.jumbotron h1 {
|
106
|
-
font-size: 45px;
|
107
|
-
}
|
108
|
-
.jumbotron p,
|
109
|
-
.jumbotron .btn {
|
110
|
-
font-size: 18px;
|
111
|
-
}
|
112
|
-
.jumbotron .btn {
|
113
|
-
display: block;
|
114
|
-
margin: 0 auto;
|
115
|
-
}
|
116
|
-
|
117
|
-
.subhead h1,
|
118
|
-
.subhead p {
|
119
|
-
text-align: center;
|
120
|
-
}
|
121
|
-
|
122
|
-
.marketing h1 {
|
123
|
-
font-size: 30px;
|
124
|
-
}
|
125
|
-
.marketing-byline {
|
126
|
-
font-size: 18px;
|
127
|
-
}
|
128
|
-
|
129
|
-
.example-sites {
|
130
|
-
margin-left: 0;
|
131
|
-
}
|
132
|
-
.example-sites > li {
|
133
|
-
float: none;
|
134
|
-
display: block;
|
135
|
-
max-width: 280px;
|
136
|
-
margin: 0 auto 18px;
|
137
|
-
text-align: center;
|
138
|
-
}
|
139
|
-
.example-sites .thumbnail > img {
|
140
|
-
max-width: 270px;
|
141
|
-
}
|
142
|
-
|
143
|
-
table code {
|
144
|
-
white-space: normal;
|
145
|
-
word-wrap: break-word;
|
146
|
-
word-break: break-all;
|
147
|
-
}
|
148
|
-
|
149
|
-
.modal-example .modal {
|
150
|
-
position: relative;
|
151
|
-
top: auto;
|
152
|
-
right: auto;
|
153
|
-
bottom: auto;
|
154
|
-
left: auto;
|
155
|
-
}
|
156
|
-
|
157
|
-
.footer {
|
158
|
-
padding-top: 20px;
|
159
|
-
padding-bottom: 20px;
|
160
|
-
}
|
161
|
-
.footer .pull-right {
|
162
|
-
float: none;
|
163
|
-
}
|
164
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<p>
|
2
|
-
Use <code><pre></code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.
|
3
|
-
</p>
|
4
|
-
|
5
|
-
<pre>
|
6
|
-
def find(*file_names)
|
7
|
-
pathname.ascend do |path|
|
8
|
-
file_name = file_names.detect { |fn| path.join(fn).file? }
|
9
|
-
break path.join(file_name) if file_name
|
10
|
-
end
|
11
|
-
end
|
12
|
-
</pre>
|
@@ -1,714 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<!-- Forms
|
5
|
-
================================================== -->
|
6
|
-
<section id="forms">
|
7
|
-
<div class="page-header">
|
8
|
-
<h1>Forms</h1>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<h2>Default styles</h2>
|
12
|
-
<p>Individual form controls receive styling, but without any required base class on the <code><form></code> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.</p>
|
13
|
-
<form class="bs-docs-example">
|
14
|
-
<fieldset>
|
15
|
-
<legend>Legend</legend>
|
16
|
-
<label>Label name</label>
|
17
|
-
<input type="text" placeholder="Type something…">
|
18
|
-
<span class="help-block">Example block-level help text here.</span>
|
19
|
-
<label class="checkbox">
|
20
|
-
<input type="checkbox"> Check me out
|
21
|
-
</label>
|
22
|
-
<button type="submit" class="btn">Submit</button>
|
23
|
-
</fieldset>
|
24
|
-
</form>
|
25
|
-
<pre class="prettyprint linenums">
|
26
|
-
<form>
|
27
|
-
<fieldset>
|
28
|
-
<legend>Legend</legend>
|
29
|
-
<label>Label name</label>
|
30
|
-
<input type="text" placeholder="Type something…">
|
31
|
-
<span class="help-block">Example block-level help text here.</span>
|
32
|
-
<label class="checkbox">
|
33
|
-
<input type="checkbox"> Check me out
|
34
|
-
</label>
|
35
|
-
<button type="submit" class="btn">Submit</button>
|
36
|
-
</fieldset>
|
37
|
-
</form>
|
38
|
-
</pre>
|
39
|
-
|
40
|
-
|
41
|
-
<hr class="bs-docs-separator">
|
42
|
-
|
43
|
-
|
44
|
-
<h2>Optional layouts</h2>
|
45
|
-
<p>Included with Bootstrap are three optional form layouts for common use cases.</p>
|
46
|
-
|
47
|
-
<h3>Search form</h3>
|
48
|
-
<p>Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code><input></code> for an extra-rounded text input.</p>
|
49
|
-
<form class="bs-docs-example form-search">
|
50
|
-
<input type="text" class="input-medium search-query">
|
51
|
-
<button type="submit" class="btn">Search</button>
|
52
|
-
</form>
|
53
|
-
<pre class="prettyprint linenums">
|
54
|
-
<form class="form-search">
|
55
|
-
<input type="text" class="input-medium search-query">
|
56
|
-
<button type="submit" class="btn">Search</button>
|
57
|
-
</form>
|
58
|
-
</pre>
|
59
|
-
|
60
|
-
<h3>Inline form</h3>
|
61
|
-
<p>Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.</p>
|
62
|
-
<form class="bs-docs-example form-inline">
|
63
|
-
<input type="text" class="input-small" placeholder="Email">
|
64
|
-
<input type="password" class="input-small" placeholder="Password">
|
65
|
-
<label class="checkbox">
|
66
|
-
<input type="checkbox"> Remember me
|
67
|
-
</label>
|
68
|
-
<button type="submit" class="btn">Sign in</button>
|
69
|
-
</form>
|
70
|
-
<pre class="prettyprint linenums">
|
71
|
-
<form class="form-inline">
|
72
|
-
<input type="text" class="input-small" placeholder="Email">
|
73
|
-
<input type="password" class="input-small" placeholder="Password">
|
74
|
-
<label class="checkbox">
|
75
|
-
<input type="checkbox"> Remember me
|
76
|
-
</label>
|
77
|
-
<button type="submit" class="btn">Sign in</button>
|
78
|
-
</form>
|
79
|
-
</pre>
|
80
|
-
|
81
|
-
<h3>Horizontal form</h3>
|
82
|
-
<p>Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:</p>
|
83
|
-
<ul>
|
84
|
-
<li>Add <code>.form-horizontal</code> to the form</li>
|
85
|
-
<li>Wrap labels and controls in <code>.control-group</code></li>
|
86
|
-
<li>Add <code>.control-label</code> to the label</li>
|
87
|
-
<li>Wrap any associated controls in <code>.controls</code> for proper alignment</li>
|
88
|
-
</ul>
|
89
|
-
<form class="bs-docs-example form-horizontal">
|
90
|
-
<div class="control-group">
|
91
|
-
<label class="control-label" for="inputEmail">Email</label>
|
92
|
-
<div class="controls">
|
93
|
-
<input type="text" id="inputEmail" placeholder="Email">
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
<div class="control-group">
|
97
|
-
<label class="control-label" for="inputPassword">Password</label>
|
98
|
-
<div class="controls">
|
99
|
-
<input type="password" id="inputPassword" placeholder="Password">
|
100
|
-
</div>
|
101
|
-
</div>
|
102
|
-
<div class="control-group">
|
103
|
-
<div class="controls">
|
104
|
-
<label class="checkbox">
|
105
|
-
<input type="checkbox"> Remember me
|
106
|
-
</label>
|
107
|
-
<button type="submit" class="btn">Sign in</button>
|
108
|
-
</div>
|
109
|
-
</div>
|
110
|
-
</form>
|
111
|
-
<pre class="prettyprint linenums">
|
112
|
-
<form class="form-horizontal">
|
113
|
-
<div class="control-group">
|
114
|
-
<label class="control-label" for="inputEmail">Email</label>
|
115
|
-
<div class="controls">
|
116
|
-
<input type="text" id="inputEmail" placeholder="Email">
|
117
|
-
</div>
|
118
|
-
</div>
|
119
|
-
<div class="control-group">
|
120
|
-
<label class="control-label" for="inputPassword">Password</label>
|
121
|
-
<div class="controls">
|
122
|
-
<input type="password" id="inputPassword" placeholder="Password">
|
123
|
-
</div>
|
124
|
-
</div>
|
125
|
-
<div class="control-group">
|
126
|
-
<div class="controls">
|
127
|
-
<label class="checkbox">
|
128
|
-
<input type="checkbox"> Remember me
|
129
|
-
</label>
|
130
|
-
<button type="submit" class="btn">Sign in</button>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
</form>
|
134
|
-
</pre>
|
135
|
-
|
136
|
-
|
137
|
-
<hr class="bs-docs-separator">
|
138
|
-
|
139
|
-
|
140
|
-
<h2>Supported form controls</h2>
|
141
|
-
<p>Examples of standard form controls supported in an example form layout.</p>
|
142
|
-
|
143
|
-
<h3>Inputs</h3>
|
144
|
-
<p>Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.</p>
|
145
|
-
<p>Requires the use of a specified <code>type</code> at all times.</p>
|
146
|
-
<form class="bs-docs-example form-inline">
|
147
|
-
<input type="text" placeholder="Text input">
|
148
|
-
</form>
|
149
|
-
<pre class="prettyprint linenums">
|
150
|
-
<input type="text" placeholder="Text input">
|
151
|
-
</pre>
|
152
|
-
|
153
|
-
<h3>Textarea</h3>
|
154
|
-
<p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
|
155
|
-
<form class="bs-docs-example form-inline">
|
156
|
-
<textarea rows="3"></textarea>
|
157
|
-
</form>
|
158
|
-
<pre class="prettyprint linenums">
|
159
|
-
<textarea rows="3"></textarea>
|
160
|
-
</pre>
|
161
|
-
|
162
|
-
<h3>Checkboxes and radios</h3>
|
163
|
-
<p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p>
|
164
|
-
<h4>Default (stacked)</h4>
|
165
|
-
<form class="bs-docs-example">
|
166
|
-
<label class="checkbox">
|
167
|
-
<input type="checkbox" value="">
|
168
|
-
Option one is this and that—be sure to include why it's great
|
169
|
-
</label>
|
170
|
-
<br>
|
171
|
-
<label class="radio">
|
172
|
-
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
|
173
|
-
Option one is this and that—be sure to include why it's great
|
174
|
-
</label>
|
175
|
-
<label class="radio">
|
176
|
-
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
177
|
-
Option two can be something else and selecting it will deselect option one
|
178
|
-
</label>
|
179
|
-
</form>
|
180
|
-
<pre class="prettyprint linenums">
|
181
|
-
<label class="checkbox">
|
182
|
-
<input type="checkbox" value="">
|
183
|
-
Option one is this and that—be sure to include why it's great
|
184
|
-
</label>
|
185
|
-
|
186
|
-
<label class="radio">
|
187
|
-
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
|
188
|
-
Option one is this and that—be sure to include why it's great
|
189
|
-
</label>
|
190
|
-
<label class="radio">
|
191
|
-
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
192
|
-
Option two can be something else and selecting it will deselect option one
|
193
|
-
</label>
|
194
|
-
</pre>
|
195
|
-
|
196
|
-
<h4>Inline checkboxes</h4>
|
197
|
-
<p>Add the <code>.inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p>
|
198
|
-
<form class="bs-docs-example">
|
199
|
-
<label class="checkbox inline">
|
200
|
-
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
|
201
|
-
</label>
|
202
|
-
<label class="checkbox inline">
|
203
|
-
<input type="checkbox" id="inlineCheckbox2" value="option2"> 2
|
204
|
-
</label>
|
205
|
-
<label class="checkbox inline">
|
206
|
-
<input type="checkbox" id="inlineCheckbox3" value="option3"> 3
|
207
|
-
</label>
|
208
|
-
</form>
|
209
|
-
<pre class="prettyprint linenums">
|
210
|
-
<label class="checkbox inline">
|
211
|
-
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
|
212
|
-
</label>
|
213
|
-
<label class="checkbox inline">
|
214
|
-
<input type="checkbox" id="inlineCheckbox2" value="option2"> 2
|
215
|
-
</label>
|
216
|
-
<label class="checkbox inline">
|
217
|
-
<input type="checkbox" id="inlineCheckbox3" value="option3"> 3
|
218
|
-
</label>
|
219
|
-
</pre>
|
220
|
-
|
221
|
-
<h3>Selects</h3>
|
222
|
-
<p>Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.</p>
|
223
|
-
<form class="bs-docs-example">
|
224
|
-
<select>
|
225
|
-
<option>1</option>
|
226
|
-
<option>2</option>
|
227
|
-
<option>3</option>
|
228
|
-
<option>4</option>
|
229
|
-
<option>5</option>
|
230
|
-
</select>
|
231
|
-
<br>
|
232
|
-
<select multiple="multiple">
|
233
|
-
<option>1</option>
|
234
|
-
<option>2</option>
|
235
|
-
<option>3</option>
|
236
|
-
<option>4</option>
|
237
|
-
<option>5</option>
|
238
|
-
</select>
|
239
|
-
</form>
|
240
|
-
<pre class="prettyprint linenums">
|
241
|
-
<select>
|
242
|
-
<option>1</option>
|
243
|
-
<option>2</option>
|
244
|
-
<option>3</option>
|
245
|
-
<option>4</option>
|
246
|
-
<option>5</option>
|
247
|
-
</select>
|
248
|
-
|
249
|
-
<select multiple="multiple">
|
250
|
-
<option>1</option>
|
251
|
-
<option>2</option>
|
252
|
-
<option>3</option>
|
253
|
-
<option>4</option>
|
254
|
-
<option>5</option>
|
255
|
-
</select>
|
256
|
-
</pre>
|
257
|
-
|
258
|
-
|
259
|
-
<hr class="bs-docs-separator">
|
260
|
-
|
261
|
-
|
262
|
-
<h2>Extending form controls</h2>
|
263
|
-
<p>Adding on top of existing browser controls, Bootstrap includes other useful form components.</p>
|
264
|
-
|
265
|
-
<h3>Prepended and appended inputs</h3>
|
266
|
-
<p>Add text or buttons before or after any text-based input. Do note that <code>select</code> elements are not supported here.</p>
|
267
|
-
|
268
|
-
<h4>Default options</h4>
|
269
|
-
<p>Wrap an <code>.add-on</code> and an <code>input</code> with one of two classes to prepend or append text to an input.</p>
|
270
|
-
<form class="bs-docs-example">
|
271
|
-
<div class="input-prepend">
|
272
|
-
<span class="add-on">@</span>
|
273
|
-
<input class="span2" id="prependedInput" type="text" placeholder="Username">
|
274
|
-
</div>
|
275
|
-
<br>
|
276
|
-
<div class="input-append">
|
277
|
-
<input class="span2" id="appendedInput" type="text">
|
278
|
-
<span class="add-on">.00</span>
|
279
|
-
</div>
|
280
|
-
</form>
|
281
|
-
<pre class="prettyprint linenums">
|
282
|
-
<div class="input-prepend">
|
283
|
-
<span class="add-on">@</span>
|
284
|
-
<input class="span2" id="prependedInput" type="text" placeholder="Username">
|
285
|
-
</div>
|
286
|
-
<div class="input-append">
|
287
|
-
<input class="span2" id="appendedInput" type="text">
|
288
|
-
<span class="add-on">.00</span>
|
289
|
-
</div>
|
290
|
-
</pre>
|
291
|
-
|
292
|
-
<h4>Combined</h4>
|
293
|
-
<p>Use both classes and two instances of <code>.add-on</code> to prepend and append an input.</p>
|
294
|
-
<form class="bs-docs-example form-inline">
|
295
|
-
<div class="input-prepend input-append">
|
296
|
-
<span class="add-on">$</span>
|
297
|
-
<input class="span2" id="appendedPrependedInput" type="text">
|
298
|
-
<span class="add-on">.00</span>
|
299
|
-
</div>
|
300
|
-
</form>
|
301
|
-
<pre class="prettyprint linenums">
|
302
|
-
<div class="input-prepend input-append">
|
303
|
-
<span class="add-on">$</span>
|
304
|
-
<input class="span2" id="appendedPrependedInput" type="text">
|
305
|
-
<span class="add-on">.00</span>
|
306
|
-
</div>
|
307
|
-
</pre>
|
308
|
-
|
309
|
-
<h4>Buttons instead of text</h4>
|
310
|
-
<p>Instead of a <code><span></code> with text, use a <code>.btn</code> to attach a button (or two) to an input.</p>
|
311
|
-
<form class="bs-docs-example">
|
312
|
-
<div class="input-append">
|
313
|
-
<input class="span2" id="appendedInputButton" type="text">
|
314
|
-
<button class="btn" type="button">Go!</button>
|
315
|
-
</div>
|
316
|
-
</form>
|
317
|
-
<pre class="prettyprint linenums">
|
318
|
-
<div class="input-append">
|
319
|
-
<input class="span2" id="appendedInputButton" type="text">
|
320
|
-
<button class="btn" type="button">Go!</button>
|
321
|
-
</div>
|
322
|
-
</pre>
|
323
|
-
<form class="bs-docs-example">
|
324
|
-
<div class="input-append">
|
325
|
-
<input class="span2" id="appendedInputButtons" type="text">
|
326
|
-
<button class="btn" type="button">Search</button>
|
327
|
-
<button class="btn" type="button">Options</button>
|
328
|
-
</div>
|
329
|
-
</form>
|
330
|
-
<pre class="prettyprint linenums">
|
331
|
-
<div class="input-append">
|
332
|
-
<input class="span2" id="appendedInputButtons" type="text">
|
333
|
-
<button class="btn" type="button">Search</button>
|
334
|
-
<button class="btn" type="button">Options</button>
|
335
|
-
</div>
|
336
|
-
</pre>
|
337
|
-
|
338
|
-
<h4>Button dropdowns</h4>
|
339
|
-
<p></p>
|
340
|
-
<form class="bs-docs-example">
|
341
|
-
<div class="input-append">
|
342
|
-
<input class="span2" id="appendedDropdownButton" type="text">
|
343
|
-
<div class="btn-group">
|
344
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
345
|
-
<ul class="dropdown-menu">
|
346
|
-
<li><a href="#">Action</a></li>
|
347
|
-
<li><a href="#">Another action</a></li>
|
348
|
-
<li><a href="#">Something else here</a></li>
|
349
|
-
<li class="divider"></li>
|
350
|
-
<li><a href="#">Separated link</a></li>
|
351
|
-
</ul>
|
352
|
-
</div><!-- /btn-group -->
|
353
|
-
</div><!-- /input-append -->
|
354
|
-
</form>
|
355
|
-
<pre class="prettyprint linenums">
|
356
|
-
<div class="input-append">
|
357
|
-
<input class="span2" id="appendedDropdownButton" type="text">
|
358
|
-
<div class="btn-group">
|
359
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
360
|
-
Action
|
361
|
-
<span class="caret"></span>
|
362
|
-
</button>
|
363
|
-
<ul class="dropdown-menu">
|
364
|
-
...
|
365
|
-
</ul>
|
366
|
-
</div>
|
367
|
-
</div>
|
368
|
-
</pre>
|
369
|
-
|
370
|
-
<form class="bs-docs-example">
|
371
|
-
<div class="input-prepend">
|
372
|
-
<div class="btn-group">
|
373
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
374
|
-
<ul class="dropdown-menu">
|
375
|
-
<li><a href="#">Action</a></li>
|
376
|
-
<li><a href="#">Another action</a></li>
|
377
|
-
<li><a href="#">Something else here</a></li>
|
378
|
-
<li class="divider"></li>
|
379
|
-
<li><a href="#">Separated link</a></li>
|
380
|
-
</ul>
|
381
|
-
</div><!-- /btn-group -->
|
382
|
-
<input class="span2" id="prependedDropdownButton" type="text">
|
383
|
-
</div><!-- /input-prepend -->
|
384
|
-
</form>
|
385
|
-
<pre class="prettyprint linenums">
|
386
|
-
<div class="input-prepend">
|
387
|
-
<div class="btn-group">
|
388
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
389
|
-
Action
|
390
|
-
<span class="caret"></span>
|
391
|
-
</button>
|
392
|
-
<ul class="dropdown-menu">
|
393
|
-
...
|
394
|
-
</ul>
|
395
|
-
</div>
|
396
|
-
<input class="span2" id="prependedDropdownButton" type="text">
|
397
|
-
</div>
|
398
|
-
</pre>
|
399
|
-
|
400
|
-
<form class="bs-docs-example">
|
401
|
-
<div class="input-prepend input-append">
|
402
|
-
<div class="btn-group">
|
403
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
404
|
-
<ul class="dropdown-menu">
|
405
|
-
<li><a href="#">Action</a></li>
|
406
|
-
<li><a href="#">Another action</a></li>
|
407
|
-
<li><a href="#">Something else here</a></li>
|
408
|
-
<li class="divider"></li>
|
409
|
-
<li><a href="#">Separated link</a></li>
|
410
|
-
</ul>
|
411
|
-
</div><!-- /btn-group -->
|
412
|
-
<input class="span2" id="appendedPrependedDropdownButton" type="text">
|
413
|
-
<div class="btn-group">
|
414
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
415
|
-
<ul class="dropdown-menu">
|
416
|
-
<li><a href="#">Action</a></li>
|
417
|
-
<li><a href="#">Another action</a></li>
|
418
|
-
<li><a href="#">Something else here</a></li>
|
419
|
-
<li class="divider"></li>
|
420
|
-
<li><a href="#">Separated link</a></li>
|
421
|
-
</ul>
|
422
|
-
</div><!-- /btn-group -->
|
423
|
-
</div><!-- /input-prepend input-append -->
|
424
|
-
</form>
|
425
|
-
<pre class="prettyprint linenums">
|
426
|
-
<div class="input-prepend input-append">
|
427
|
-
<div class="btn-group">
|
428
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
429
|
-
Action
|
430
|
-
<span class="caret"></span>
|
431
|
-
</button>
|
432
|
-
<ul class="dropdown-menu">
|
433
|
-
...
|
434
|
-
</ul>
|
435
|
-
</div>
|
436
|
-
<input class="span2" id="appendedPrependedDropdownButton" type="text">
|
437
|
-
<div class="btn-group">
|
438
|
-
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
439
|
-
Action
|
440
|
-
<span class="caret"></span>
|
441
|
-
</button>
|
442
|
-
<ul class="dropdown-menu">
|
443
|
-
...
|
444
|
-
</ul>
|
445
|
-
</div>
|
446
|
-
</div>
|
447
|
-
</pre>
|
448
|
-
|
449
|
-
<h4>Search form</h4>
|
450
|
-
<form class="bs-docs-example form-search">
|
451
|
-
<div class="input-append">
|
452
|
-
<input type="text" class="span2 search-query">
|
453
|
-
<button type="submit" class="btn">Search</button>
|
454
|
-
</div>
|
455
|
-
<div class="input-prepend">
|
456
|
-
<button type="submit" class="btn">Search</button>
|
457
|
-
<input type="text" class="span2 search-query">
|
458
|
-
</div>
|
459
|
-
</form>
|
460
|
-
<pre class="prettyprint linenums">
|
461
|
-
<form class="form-search">
|
462
|
-
<div class="input-append">
|
463
|
-
<input type="text" class="span2 search-query">
|
464
|
-
<button type="submit" class="btn">Search</button>
|
465
|
-
</div>
|
466
|
-
<div class="input-prepend">
|
467
|
-
<button type="submit" class="btn">Search</button>
|
468
|
-
<input type="text" class="span2 search-query">
|
469
|
-
</div>
|
470
|
-
</form>
|
471
|
-
</pre>
|
472
|
-
|
473
|
-
<h3>Control sizing</h3>
|
474
|
-
<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>
|
475
|
-
|
476
|
-
<h4>Block level inputs</h4>
|
477
|
-
<p>Make any <code><input></code> or <code><textarea></code> element behave like a block level element.</p>
|
478
|
-
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
479
|
-
<div class="controls">
|
480
|
-
<input class="input-block-level" type="text" placeholder=".input-block-level">
|
481
|
-
</div>
|
482
|
-
</form>
|
483
|
-
<pre class="prettyprint linenums">
|
484
|
-
<input class="input-block-level" type="text" placeholder=".input-block-level">
|
485
|
-
</pre>
|
486
|
-
|
487
|
-
<h4>Relative sizing</h4>
|
488
|
-
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
489
|
-
<div class="controls docs-input-sizes">
|
490
|
-
<input class="input-mini" type="text" placeholder=".input-mini">
|
491
|
-
<input class="input-small" type="text" placeholder=".input-small">
|
492
|
-
<input class="input-medium" type="text" placeholder=".input-medium">
|
493
|
-
<input class="input-large" type="text" placeholder=".input-large">
|
494
|
-
<input class="input-xlarge" type="text" placeholder=".input-xlarge">
|
495
|
-
<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
|
496
|
-
</div>
|
497
|
-
</form>
|
498
|
-
<pre class="prettyprint linenums">
|
499
|
-
<input class="input-mini" type="text" placeholder=".input-mini">
|
500
|
-
<input class="input-small" type="text" placeholder=".input-small">
|
501
|
-
<input class="input-medium" type="text" placeholder=".input-medium">
|
502
|
-
<input class="input-large" type="text" placeholder=".input-large">
|
503
|
-
<input class="input-xlarge" type="text" placeholder=".input-xlarge">
|
504
|
-
<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
|
505
|
-
</pre>
|
506
|
-
<p>
|
507
|
-
<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.
|
508
|
-
</p>
|
509
|
-
|
510
|
-
<h4>Grid sizing</h4>
|
511
|
-
<p>Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid columns.</p>
|
512
|
-
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
513
|
-
<div class="controls docs-input-sizes">
|
514
|
-
<input class="span1" type="text" placeholder=".span1">
|
515
|
-
<input class="span2" type="text" placeholder=".span2">
|
516
|
-
<input class="span3" type="text" placeholder=".span3">
|
517
|
-
<select class="span1">
|
518
|
-
<option>1</option>
|
519
|
-
<option>2</option>
|
520
|
-
<option>3</option>
|
521
|
-
<option>4</option>
|
522
|
-
<option>5</option>
|
523
|
-
</select>
|
524
|
-
<select class="span2">
|
525
|
-
<option>1</option>
|
526
|
-
<option>2</option>
|
527
|
-
<option>3</option>
|
528
|
-
<option>4</option>
|
529
|
-
<option>5</option>
|
530
|
-
</select>
|
531
|
-
<select class="span3">
|
532
|
-
<option>1</option>
|
533
|
-
<option>2</option>
|
534
|
-
<option>3</option>
|
535
|
-
<option>4</option>
|
536
|
-
<option>5</option>
|
537
|
-
</select>
|
538
|
-
</div>
|
539
|
-
</form>
|
540
|
-
<pre class="prettyprint linenums">
|
541
|
-
<input class="span1" type="text" placeholder=".span1">
|
542
|
-
<input class="span2" type="text" placeholder=".span2">
|
543
|
-
<input class="span3" type="text" placeholder=".span3">
|
544
|
-
<select class="span1">
|
545
|
-
...
|
546
|
-
</select>
|
547
|
-
<select class="span2">
|
548
|
-
...
|
549
|
-
</select>
|
550
|
-
<select class="span3">
|
551
|
-
...
|
552
|
-
</select>
|
553
|
-
</pre>
|
554
|
-
|
555
|
-
<p>For multiple grid inputs per line, <strong>use the <code>.controls-row</code> modifier class for proper spacing</strong>. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.</p>
|
556
|
-
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
557
|
-
<div class="controls">
|
558
|
-
<input class="span5" type="text" placeholder=".span5">
|
559
|
-
</div>
|
560
|
-
<div class="controls controls-row">
|
561
|
-
<input class="span4" type="text" placeholder=".span4">
|
562
|
-
<input class="span1" type="text" placeholder=".span1">
|
563
|
-
</div>
|
564
|
-
<div class="controls controls-row">
|
565
|
-
<input class="span3" type="text" placeholder=".span3">
|
566
|
-
<input class="span2" type="text" placeholder=".span2">
|
567
|
-
</div>
|
568
|
-
<div class="controls controls-row">
|
569
|
-
<input class="span2" type="text" placeholder=".span2">
|
570
|
-
<input class="span3" type="text" placeholder=".span3">
|
571
|
-
</div>
|
572
|
-
<div class="controls controls-row">
|
573
|
-
<input class="span1" type="text" placeholder=".span1">
|
574
|
-
<input class="span4" type="text" placeholder=".span4">
|
575
|
-
</div>
|
576
|
-
</form>
|
577
|
-
<pre class="prettyprint linenums">
|
578
|
-
<div class="controls">
|
579
|
-
<input class="span5" type="text" placeholder=".span5">
|
580
|
-
</div>
|
581
|
-
<div class="controls controls-row">
|
582
|
-
<input class="span4" type="text" placeholder=".span4">
|
583
|
-
<input class="span1" type="text" placeholder=".span1">
|
584
|
-
</div>
|
585
|
-
...
|
586
|
-
</pre>
|
587
|
-
|
588
|
-
<h3>Uneditable inputs</h3>
|
589
|
-
<p>Present data in a form that's not editable without using actual form markup.</p>
|
590
|
-
<form class="bs-docs-example">
|
591
|
-
<span class="input-xlarge uneditable-input">Some value here</span>
|
592
|
-
</form>
|
593
|
-
<pre class="prettyprint linenums">
|
594
|
-
<span class="input-xlarge uneditable-input">Some value here</span>
|
595
|
-
</pre>
|
596
|
-
|
597
|
-
<h3>Form actions</h3>
|
598
|
-
<p>End a form with a group of actions (buttons). When placed within a <code>.form-horizontal</code>, the buttons will automatically indent to line up with the form controls.</p>
|
599
|
-
<form class="bs-docs-example">
|
600
|
-
<div class="form-actions">
|
601
|
-
<button type="submit" class="btn btn-primary">Save changes</button>
|
602
|
-
<button type="button" class="btn">Cancel</button>
|
603
|
-
</div>
|
604
|
-
</form>
|
605
|
-
<pre class="prettyprint linenums">
|
606
|
-
<div class="form-actions">
|
607
|
-
<button type="submit" class="btn btn-primary">Save changes</button>
|
608
|
-
<button type="button" class="btn">Cancel</button>
|
609
|
-
</div>
|
610
|
-
</pre>
|
611
|
-
|
612
|
-
<h3>Help text</h3>
|
613
|
-
<p>Inline and block level support for help text that appears around form controls.</p>
|
614
|
-
<h4>Inline help</h4>
|
615
|
-
<form class="bs-docs-example form-inline">
|
616
|
-
<input type="text"> <span class="help-inline">Inline help text</span>
|
617
|
-
</form>
|
618
|
-
<pre class="prettyprint linenums">
|
619
|
-
<input type="text"><span class="help-inline">Inline help text</span>
|
620
|
-
</pre>
|
621
|
-
|
622
|
-
<h4>Block help</h4>
|
623
|
-
<form class="bs-docs-example form-inline">
|
624
|
-
<input type="text">
|
625
|
-
<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
|
626
|
-
</form>
|
627
|
-
<pre class="prettyprint linenums">
|
628
|
-
<input type="text"><span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
|
629
|
-
</pre>
|
630
|
-
|
631
|
-
|
632
|
-
<hr class="bs-docs-separator">
|
633
|
-
|
634
|
-
|
635
|
-
<h2>Form control states</h2>
|
636
|
-
<p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>
|
637
|
-
|
638
|
-
<h3>Input focus</h3>
|
639
|
-
<p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p>
|
640
|
-
<form class="bs-docs-example form-inline">
|
641
|
-
<input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused...">
|
642
|
-
</form>
|
643
|
-
<pre class="prettyprint linenums">
|
644
|
-
<input class="input-xlarge" id="focusedInput" type="text" value="This is focused...">
|
645
|
-
</pre>
|
646
|
-
|
647
|
-
<h3>Disabled inputs</h3>
|
648
|
-
<p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
|
649
|
-
<form class="bs-docs-example form-inline">
|
650
|
-
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
|
651
|
-
</form>
|
652
|
-
<pre class="prettyprint linenums">
|
653
|
-
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
654
|
-
</pre>
|
655
|
-
|
656
|
-
<h3>Validation states</h3>
|
657
|
-
<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
|
658
|
-
|
659
|
-
<form class="bs-docs-example form-horizontal">
|
660
|
-
<div class="control-group warning">
|
661
|
-
<label class="control-label" for="inputWarning">Input with warning</label>
|
662
|
-
<div class="controls">
|
663
|
-
<input type="text" id="inputWarning">
|
664
|
-
<span class="help-inline">Something may have gone wrong</span>
|
665
|
-
</div>
|
666
|
-
</div>
|
667
|
-
<div class="control-group error">
|
668
|
-
<label class="control-label" for="inputError">Input with error</label>
|
669
|
-
<div class="controls">
|
670
|
-
<input type="text" id="inputError">
|
671
|
-
<span class="help-inline">Please correct the error</span>
|
672
|
-
</div>
|
673
|
-
</div>
|
674
|
-
<div class="control-group info">
|
675
|
-
<label class="control-label" for="inputInfo">Input with info</label>
|
676
|
-
<div class="controls">
|
677
|
-
<input type="text" id="inputInfo">
|
678
|
-
<span class="help-inline">Username is taken</span>
|
679
|
-
</div>
|
680
|
-
</div>
|
681
|
-
<div class="control-group success">
|
682
|
-
<label class="control-label" for="inputSuccess">Input with success</label>
|
683
|
-
<div class="controls">
|
684
|
-
<input type="text" id="inputSuccess">
|
685
|
-
<span class="help-inline">Woohoo!</span>
|
686
|
-
</div>
|
687
|
-
</div>
|
688
|
-
</form>
|
689
|
-
<pre class="prettyprint linenums">
|
690
|
-
<div class="control-group warning">
|
691
|
-
<label class="control-label" for="inputWarning">Input with warning</label>
|
692
|
-
<div class="controls">
|
693
|
-
<input type="text" id="inputWarning">
|
694
|
-
<span class="help-inline">Something may have gone wrong</span>
|
695
|
-
</div>
|
696
|
-
</div>
|
697
|
-
<div class="control-group error">
|
698
|
-
<label class="control-label" for="inputError">Input with error</label>
|
699
|
-
<div class="controls">
|
700
|
-
<input type="text" id="inputError">
|
701
|
-
<span class="help-inline">Please correct the error</span>
|
702
|
-
</div>
|
703
|
-
</div>
|
704
|
-
<div class="control-group success">
|
705
|
-
<label class="control-label" for="inputSuccess">Input with success</label>
|
706
|
-
<div class="controls">
|
707
|
-
<input type="text" id="inputSuccess">
|
708
|
-
<span class="help-inline">Woohoo!</span>
|
709
|
-
</div>
|
710
|
-
</div>
|
711
|
-
</pre>
|
712
|
-
|
713
|
-
</section>
|
714
|
-
|