bootstrap-bookingsync-sass 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- ## Switch
1
+ # Switch
2
2
 
3
3
  Turns checkboxes and radio buttons in toggle switches
4
4
 
@@ -20,8 +20,13 @@ Turns checkboxes and radio buttons in toggle switches
20
20
  </div>
21
21
 
22
22
  <div class="example">
23
- <div class="make-switch switch-small">
24
- <input type="checkbox" checked>
23
+ <div class="sheet-header">
24
+ <h3 id="switch-example">Basic example</h3>
25
+ </div>
26
+ <div class="bs-example bs-sheet" data-example-id="switch-example">
27
+ <div class="make-switch switch-small">
28
+ <input type="checkbox" checked>
29
+ </div>
25
30
  </div>
26
31
  </div>
27
32
  ~~~ HTML
@@ -30,11 +35,14 @@ Turns checkboxes and radio buttons in toggle switches
30
35
  </div>
31
36
  ~~~
32
37
 
33
- ### Disabled state
34
-
35
38
  <div class="example">
36
- <div class="make-switch switch-small">
37
- <input type="checkbox" checked disabled>
39
+ <div class="sheet-header">
40
+ <h3 id="switch-example-disabled">Disabled state</h3>
41
+ </div>
42
+ <div class="bs-example bs-sheet" data-example-id="switch-example-disabled">
43
+ <div class="make-switch switch-small">
44
+ <input type="checkbox" checked disabled>
45
+ </div>
38
46
  </div>
39
47
  </div>
40
48
  ~~~ HTML
@@ -7,18 +7,43 @@
7
7
  </h3>
8
8
  </div>
9
9
  <div class="list-group">
10
- <%= link_to("Basic example", "#basic-example", class: "list-group-item") %>
11
- <%= link_to("Inline form", "#inline-form", class: "list-group-item") %>
12
- <%= link_to("Horizontal form", "#horizontal-form", class: "list-group-item") %>
13
- <%= link_to("Supported controls", "#supported-controls", class: "list-group-item") %>
14
- <%= link_to("Static control", "#static-control", class: "list-group-item") %>
15
- <%= link_to("Focus state", "#focus-state", class: "list-group-item") %>
16
- <%= link_to("Filled state", "#filled-state", class: "list-group-item") %>
17
- <%= link_to("Disabled state", "#disabled-state", class: "list-group-item") %>
18
- <%= link_to("Readonly state", "#readonly-state", class: "list-group-item") %>
19
- <%= link_to("Help text", "#help-text", class: "list-group-item") %>
20
- <%= link_to("Validation states", "#validation-states", class: "list-group-item") %>
21
- <%= link_to("Control sizing", "#control-sizing", class: "list-group-item") %>
10
+ <%= link_to("Basic form", "#forms-example", class: "list-group-item") %>
11
+ <%= link_to("Inline form", "#forms-example-inline", class: "list-group-item") %>
12
+ <%= link_to("Inline form with checkboxes", "#forms-example-inline-checkboxes",
13
+ class: "list-group-item") %>
14
+ <%= link_to("Inline form with input group", "#forms-example-inline-input-group",
15
+ class: "list-group-item") %>
16
+ <%= link_to("Horizontal form", "#forms-example-horizontal", class: "list-group-item") %>
17
+ <%= link_to("Inputs", "#forms-example-inputs", class: "list-group-item") %>
18
+ <%= link_to("Textarea", "#forms-example-textarea", class: "list-group-item") %>
19
+ <%= link_to("Checkboxes and radios (stacked)", "#forms-example-checkboxes-radios",
20
+ class: "list-group-item") %>
21
+ <%= link_to("Inline checkboxes and radios", "#forms-example-inline-checkboxes-radios",
22
+ class: "list-group-item") %>
23
+ <%= link_to("Checkboxes and radios without label text",
24
+ "#forms-example-checkboxes-radios-without-label",
25
+ class: "list-group-item") %>
26
+ <%= link_to("Select", "#forms-example-select", class: "list-group-item") %>
27
+ <%= link_to("Multiple Select", "#forms-example-multiple-select",
28
+ class: "list-group-item") %>
29
+ <%= link_to("Static control", "#forms-example-static", class: "list-group-item") %>
30
+ <%= link_to("Focus state", "#forms-example-focus", class: "list-group-item") %>
31
+ <%= link_to("Filled state", "#forms-example-filled", class: "list-group-item") %>
32
+ <%= link_to("Disabled state", "#forms-example-disabled", class: "list-group-item") %>
33
+ <%= link_to("Disabled fieldsets", "#forms-example-disabled-fieldsets",
34
+ class: "list-group-item") %>
35
+ <%= link_to("Readonly state", "#forms-example-readonly", class: "list-group-item") %>
36
+ <%= link_to("Help text", "#forms-example-help-text", class: "list-group-item") %>
37
+ <%= link_to("Validation states", "#forms-example-validation", class: "list-group-item") %>
38
+ <%= link_to("Validation with optional icons", "#forms-example-validation-with-icons",
39
+ class: "list-group-item") %>
40
+ <%= link_to("Validation with optional icons in horizontal and inline forms",
41
+ "#forms-example-validation-with-icons-horizontal-inline",
42
+ class: "list-group-item") %>
43
+ <%= link_to("Height sizing", "#forms-example-height-sizing", class: "list-group-item") %>
44
+ <%= link_to("Horizontal form group sizes", "#forms-example-horizontal-group-sizes",
45
+ class: "list-group-item") %>
46
+ <%= link_to("Column sizing", "#forms-example-column-sizing", class: "list-group-item") %>
22
47
  </div>
23
48
  <div class="panel-heading">
24
49
  <h3 class="panel-title">
@@ -26,17 +51,18 @@
26
51
  </h3>
27
52
  </div>
28
53
  <div class="list-group">
29
- <%= link_to("Basic example", "#basic-example", class: "list-group-item") %>
54
+ <%= link_to("Vertical alignment", "#helper-example-vertical-alignment",
55
+ class: "list-group-item") %>
56
+ <%= link_to("Vertical table alignment", "#forms-example-vertical-table-alignment",
57
+ class: "list-group-item") %>
30
58
  </div>
31
59
  </div>
32
60
  </div>
33
61
 
34
62
  <div class="col-md-9 col-md-pull-3">
35
- <div class="panel panel-default">
36
- <div class="panel-body reference-body">
37
- <%= items['/css/forms/'].compiled_content %>
38
- <%= items['/css/helpers/'].compiled_content %>
39
- </div>
63
+ <div class="reference-body">
64
+ <%= items['/css/forms/'].compiled_content %>
65
+ <%= items['/css/helpers/'].compiled_content %>
40
66
  </div>
41
67
  </div>
42
68
  </div>
@@ -1,35 +1,50 @@
1
1
  # Forms
2
2
 
3
- ## Basic example
3
+ <div class="example">
4
+ <div class="sheet-header">
5
+ <h3 id="forms-example">Basic form</h3>
6
+ </div>
4
7
 
5
- Individual form controls automatically receive some global styling. All textual `<input>`, `<textarea>`, and `<select>` elements with `.form-control` are set to `width: 100%;` by default. Wrap labels and controls in `.form-group` for optimum spacing.
8
+ <p>
9
+ Individual form controls automatically receive some global styling. All textual
10
+ <code>&lt;input&gt;</code>, <code>&lt;textarea&gt;</code>, and <code>&lt;select&gt;</code>
11
+ elements with <code>.form-control</code> are set to <code>width: 100%;</code> by default.
12
+ Wrap labels and controls in <code>.form-group</code> for optimum spacing.
13
+ </p>
14
+
15
+ <div class="bs-callout bs-callout-warning">
16
+ <h4>Don't mix form groups with input groups</h4>
17
+ <p>Do not mix form groups directly with <a href="/css/#input-groups">input groups</a>.
18
+ Instead, nest the input group inside of the form group.</p>
19
+ </div>
6
20
 
7
- <div class="example">
8
- <form>
9
- <div class="form-group">
10
- <label for="exampleInputEmail1">Email address</label>
11
- <input type="email" class="form-control" id="exampleInputEmail1">
12
- </div>
13
- <div class="form-group">
14
- <label for="exampleInputPassword1">Password</label>
15
- <input type="password" class="form-control" id="exampleInputPassword1">
16
- </div>
17
- <div class="form-group">
18
- <label for="exampleTextarea1">Comment</label>
19
- <textarea class="form-control" id="exampleTextarea1" rows="5"></textarea>
20
- </div>
21
- <div class="form-group">
22
- <label for="exampleInputFile">File input</label>
23
- <input type="file" id="exampleInputFile">
24
- <p class="help-block">Example block-level help text here.</p>
25
- </div>
26
- <div class="checkbox">
27
- <label>
28
- <input type="checkbox"> Check me out
29
- </label>
30
- </div>
31
- <button type="submit" class="btn btn-default">Submit</button>
32
- </form>
21
+ <div class="bs-example bs-sheet" data-example-id="forms-example">
22
+ <form>
23
+ <div class="form-group">
24
+ <label for="exampleInputEmail1">Email address</label>
25
+ <input type="email" class="form-control" id="exampleInputEmail1">
26
+ </div>
27
+ <div class="form-group">
28
+ <label for="exampleInputPassword1">Password</label>
29
+ <input type="password" class="form-control" id="exampleInputPassword1">
30
+ </div>
31
+ <div class="form-group">
32
+ <label for="exampleTextarea1">Comment</label>
33
+ <textarea class="form-control" id="exampleTextarea1" rows="5"></textarea>
34
+ </div>
35
+ <div class="form-group">
36
+ <label for="exampleInputFile">File input</label>
37
+ <input type="file" id="exampleInputFile">
38
+ <p class="help-block">Example block-level help text here.</p>
39
+ </div>
40
+ <div class="checkbox">
41
+ <label>
42
+ <input type="checkbox"> Check me out
43
+ </label>
44
+ </div>
45
+ <button type="submit" class="btn btn-primary">Submit</button>
46
+ </form>
47
+ </div>
33
48
  </div>
34
49
 
35
50
  ~~~ html
@@ -52,40 +67,42 @@ Individual form controls automatically receive some global styling. All textual
52
67
  <input type="checkbox"> Check me out
53
68
  </label>
54
69
  </div>
55
- <button type="submit" class="btn btn-default">Submit</button>
70
+ <button type="submit" class="btn btn-primary">Submit</button>
56
71
  </form>
57
72
  ~~~
58
73
 
59
- <div class="bs-callout bs-callout-warning">
60
- <h4>Don't mix form groups with input groups</h4>
61
- <p>Do not mix form groups directly with <a href="/components/#input-groups">input groups</a>. Instead, nest the input group inside of the form group.</p>
62
- </div>
74
+ <div class="example">
75
+ <div class="sheet-header">
76
+ <h3 id="forms-example-inline">Inline form</h3>
77
+ </div>
63
78
 
64
- ## Inline form
79
+ <p>Add <code>.form-inline</code> to your form (which doesn't have to be a
80
+ <code>&lt;form&gt;</code>) for left-aligned and inline-block controls.<br>
81
+ <strong>This only applies to forms within viewports that are at least 768px wide.</strong></p>
65
82
 
66
- Add `.form-inline` to your form (which doesn't have to be a `<form>`) for left-aligned and inline-block controls. __This only applies to forms within viewports that are at least 768px wide.__
83
+ <div class="bs-callout bs-callout-danger">
84
+ <h4>May require custom widths</h4>
85
+ <p>Inputs and selects have `width: 100%;` applied by default in Bootstrap. Within inline forms, we reset that to `width: auto;` so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p>
86
+ </div>
67
87
 
68
- <div class="bs-callout bs-callout-danger">
69
- <h4>May require custom widths</h4>
70
- <p>Inputs and selects have `width: 100%;` applied by default in Bootstrap. Within inline forms, we reset that to `width: auto;` so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p>
71
- </div>
72
- <div class="bs-callout bs-callout-warning">
73
- <h4>Always add labels</h4>
74
- <p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class. There are further alternative methods of providing a label for assistive technologies, such as the `aria-label`, `aria-labelledby` or `title` attribute. If none of these is present, screen readers may resort to using the `placeholder` attribute, if present, but note that use of `placeholder` as a replacement for other labelling methods is not advised.</p>
75
- </div>
88
+ <div class="bs-callout bs-callout-warning">
89
+ <h4>Always add labels</h4>
90
+ <p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class. There are further alternative methods of providing a label for assistive technologies, such as the `aria-label`, `aria- labelledby` or `title` attribute. If none of these is present, screen readers may resort to using the `placeholder` attribute, if present, but note that use of `placeholder` as a replacement for other labelling methods is not advised.</p>
91
+ </div>
76
92
 
77
- <div class="example">
78
- <form class="form-inline">
79
- <div class="form-group">
80
- <label for="exampleInputName2">Name</label>
81
- <input type="text" class="form-control" id="exampleInputName2">
82
- </div>
83
- <div class="form-group">
84
- <label for="exampleInputEmail2">Email</label>
85
- <input type="email" class="form-control" id="exampleInputEmail2">
86
- </div>
87
- <button type="submit" class="btn btn-default">Send invitation</button>
88
- </form>
93
+ <div class="bs-example bs-sheet" data-example-id="forms-example-inline">
94
+ <form class="form-inline">
95
+ <div class="form-group">
96
+ <label for="exampleInputName2">Name</label>
97
+ <input type="text" class="form-control" id="exampleInputName2">
98
+ </div>
99
+ <div class="form-group">
100
+ <label for="exampleInputEmail2">Email</label>
101
+ <input type="email" class="form-control" id="exampleInputEmail2">
102
+ </div>
103
+ <button type="submit" class="btn btn-primary">Send invitation</button>
104
+ </form>
105
+ </div>
89
106
  </div>
90
107
 
91
108
  ~~~ html
@@ -98,27 +115,32 @@ Add `.form-inline` to your form (which doesn't have to be a `<form>`) for left-a
98
115
  <label for="exampleInputEmail2">Email</label>
99
116
  <input type="email" class="form-control" id="exampleInputEmail2">
100
117
  </div>
101
- <button type="submit" class="btn btn-default">Send invitation</button>
118
+ <button type="submit" class="btn btn-primary">Send invitation</button>
102
119
  </form>
103
120
  ~~~
104
121
 
105
122
  <div class="example">
106
- <form class="form-inline">
107
- <div class="form-group">
108
- <label for="exampleInputEmail3">Email address</label>
109
- <input type="email" class="form-control" id="exampleInputEmail3">
110
- </div>
111
- <div class="form-group">
112
- <label for="exampleInputPassword3">Password</label>
113
- <input type="password" class="form-control" id="exampleInputPassword3">
114
- </div>
115
- <div class="checkbox">
116
- <label>
117
- <input type="checkbox"> Remember me
118
- </label>
119
- </div>
120
- <button type="submit" class="btn btn-default">Sign in</button>
121
- </form>
123
+ <div class="sheet-header">
124
+ <h3 id="forms-example-inline-checkboxes">Inline form with checkboxes</h3>
125
+ </div>
126
+ <div class="bs-example bs-sheet" data-example-id="forms-example-inline-checkboxes">
127
+ <form class="form-inline">
128
+ <div class="form-group">
129
+ <label for="exampleInputEmail3">Email address</label>
130
+ <input type="email" class="form-control" id="exampleInputEmail3">
131
+ </div>
132
+ <div class="form-group">
133
+ <label for="exampleInputPassword3">Password</label>
134
+ <input type="password" class="form-control" id="exampleInputPassword3">
135
+ </div>
136
+ <div class="checkbox">
137
+ <label>
138
+ <input type="checkbox"> Remember me
139
+ </label>
140
+ </div>
141
+ <button type="submit" class="btn btn-primary">Sign in</button>
142
+ </form>
143
+ </div>
122
144
  </div>
123
145
 
124
146
  ~~~ html
@@ -136,31 +158,36 @@ Add `.form-inline` to your form (which doesn't have to be a `<form>`) for left-a
136
158
  <input type="checkbox"> Remember me
137
159
  </label>
138
160
  </div>
139
- <button type="submit" class="btn btn-default">Sign in</button>
161
+ <button type="submit" class="btn btn-primary">Sign in</button>
140
162
  </form>
141
163
  ~~~
142
164
 
143
165
  <div class="example">
144
- <form class="form-inline">
145
- <div class="form-group">
146
- <label class="sr-only" for="exampleInputAmount">Amount (in dollars)</label>
147
- <div class="input-group">
148
- <div class="input-group-addon">$</div>
149
- <input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
150
- <div class="input-group-addon">.00</div>
166
+ <div class="sheet-header">
167
+ <h3 id="forms-example-inline-input-group">Inline form with input group</h3>
168
+ </div>
169
+ <div class="bs-example bs-sheet" data-example-id="forms-example-inline-input-group">
170
+ <form class="form-inline">
171
+ <div class="form-group">
172
+ <label class="sr-only" for="exampleInputAmount">Amount (in dollars)</label>
173
+ <div class="input-group">
174
+ <div class="input-group-addon">$</div>
175
+ <input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
176
+ <div class="input-group-addon">.00</div>
177
+ </div>
151
178
  </div>
152
- </div>
153
- <div class="form-group">
154
- <div class="input-group">
155
- <div class="input-group-addon">$</div>
156
- <label for="exampleInputAmountWithLabel">Amount (in dollars)
157
- </label>
158
- <input type="text" class="form-control" id="exampleInputAmountWithLabel">
159
- <div class="input-group-addon">.00</div>
179
+ <div class="form-group">
180
+ <div class="input-group">
181
+ <div class="input-group-addon">$</div>
182
+ <label for="exampleInputAmountWithLabel">Amount (in dollars)
183
+ </label>
184
+ <input type="text" class="form-control" id="exampleInputAmountWithLabel">
185
+ <div class="input-group-addon">.00</div>
186
+ </div>
160
187
  </div>
161
- </div>
162
- <button type="submit" class="btn btn-primary">Transfer cash</button>
163
- </form>
188
+ <button type="submit" class="btn btn-primary">Transfer cash</button>
189
+ </form>
190
+ </div>
164
191
  </div>
165
192
 
166
193
  ~~~ html
@@ -186,99 +213,122 @@ Add `.form-inline` to your form (which doesn't have to be a `<form>`) for left-a
186
213
  </form>
187
214
  ~~~
188
215
 
189
- ## Horizontal form
190
-
191
- <div class="bs-callout bs-callout-info">
192
- <h4>Not Recommended</h4>
193
- <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
216
+ <div class="example">
217
+ <div class="sheet-header">
218
+ <h3 id="forms-example-horizontal">Horizontal form</h3>
219
+ </div>
220
+ <div class="bs-callout bs-callout-info">
221
+ <h4>Not Recommended</h4>
222
+ <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
223
+ </div>
194
224
  </div>
195
225
 
196
- ## Supported controls
197
-
198
- Examples of standard form controls supported in an example form layout.
199
-
200
- ### Inputs
201
-
202
- 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`.
226
+ <div class="example">
227
+ <div class="sheet-header">
228
+ <h3 id="forms-example-inputs">Inputs</h3>
229
+ </div>
230
+ <p>
231
+ Most common form control, text-based input fields. Includes support for all HTML5 types:
232
+ <code>text</code>, <code>password</code>, <code>datetime</code>, <code>datetime-local</code>,
233
+ <code>date</code>, <code>month</code>, <code>time</code>, <code>week</code>,
234
+ <code>number</code>, <code>email</code>, <code>url</code>, <code>search</code>,
235
+ <code>tel</code>, and <code>color</code>.
236
+ </p>
237
+
238
+ <div class="bs-callout bs-callout-danger">
239
+ <h4>Type declaration required</h4>
240
+ <p>Inputs will only be fully styled if their `type` is properly declared.</p>
241
+ </div>
203
242
 
204
- <div class="bs-callout bs-callout-danger">
205
- <h4>Type declaration required</h4>
206
- <p>Inputs will only be fully styled if their `type` is properly declared.</p>
207
- </div>
243
+ <div class="bs-callout bs-callout-info">
244
+ <h4>Input groups</h4>
245
+ <p>To add integrated text or buttons before and/or after any text-based
246
+ <code>&lt;input&gt;</code>, <a href="../css/#input-groups">check out the input group
247
+ component</a>.</p>
248
+ </div>
208
249
 
209
- <div class="example">
210
- <form>
211
- <input type="text" class="form-control" placeholder="Text input">
212
- </form>
250
+ <div class="bs-example bs-sheet" data-example-id="forms-example-inputs">
251
+ <form>
252
+ <input type="text" class="form-control" placeholder="Text input">
253
+ </form>
254
+ </div>
213
255
  </div>
214
256
 
215
257
  ~~~ html
216
258
  <input type="text" class="form-control" placeholder="Text input">
217
259
  ~~~
218
260
 
219
- <div class="bs-callout bs-callout-info" id="callout-xref-input-group">
220
- <h4>Input groups</h4>
221
- <p>To add integrated text or buttons before and/or after any text-based <code>&lt;input&gt;</code>, <a href="../components/#input-groups">check out the input group component</a>.</p>
222
- </div>
223
-
224
- ### Textarea
261
+ <div class="example">
262
+ <div class="sheet-header">
263
+ <h3 id="forms-example-textarea">Textarea</h3>
264
+ </div>
225
265
 
226
- Form control which supports multiple lines of text. Change `rows` attribute as necessary.
266
+ <p>Form control which supports multiple lines of text.
267
+ Change <code>rows</code> attribute as necessary.</p>
227
268
 
228
- <div class="example">
229
- <form>
230
- <div class="form-group">
231
- <textarea class="form-control" rows="3" placeholder="Textarea"></textarea>
232
- </div>
233
- </form>
269
+ <div class="bs-example bs-sheet" data-example-id="forms-example-inputs">
270
+ <form>
271
+ <div class="form-group">
272
+ <textarea class="form-control" rows="3" placeholder="Textarea"></textarea>
273
+ </div>
274
+ </form>
275
+ </div>
234
276
  </div>
235
277
 
236
278
  ~~~ html
237
279
  <textarea class="form-control" rows="3"></textarea>
238
280
  ~~~
239
281
 
240
- ### Checkboxes and radios
241
-
242
- Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.
282
+ <div class="example">
283
+ <div class="sheet-header">
284
+ <h3 id="forms-example-checkboxes-radios">Checkboxes and radios (stacked)</h3>
285
+ </div>
243
286
 
244
- Disabled checkboxes and radios are supported, but to provide a "not-allowed" cursor on hover of the parent `<label>`, you'll need to add the `.disabled` class to the parent `.radio`, `.radio-inline`, `.checkbox`, or `.checkbox-inline`.
287
+ <p>Checkboxes are for selecting one or several options in a list, while radios are for
288
+ selecting one option from many.</p>
245
289
 
246
- #### Default (stacked)
290
+ <div class="bs-callout bs-callout-info">
291
+ <h4>Disabled checkboxes and radios</h4>
292
+ <p>To provide a "not-allowed" cursor on hover of the parent <code>&lt;label&gt;</code>,
293
+ you'll need to add the <code>.disabled</code> class to the parent <code>.radio</code>,
294
+ <code>.radio-inline</code>, <code>.checkbox</code>, or <code>.checkbox-inline</code>.</p>
295
+ </div>
247
296
 
248
- <div class="example">
249
- <form>
250
- <div class="checkbox">
251
- <label>
252
- <input type="checkbox" value="">
253
- Option one is this and that&mdash;be sure to include why it's great
254
- </label>
255
- </div>
256
- <div class="checkbox">
257
- <label>
258
- <input type="checkbox" value="" disabled>
259
- Option two is disabled
260
- </label>
261
- </div>
262
- <br>
263
- <div class="radio">
264
- <label>
265
- <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
266
- Option one is this and that&mdash;be sure to include why it's great
267
- </label>
268
- </div>
269
- <div class="radio">
270
- <label>
271
- <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
272
- Option two can be something else and selecting it will deselect option one
273
- </label>
274
- </div>
275
- <div class="radio">
276
- <label>
277
- <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
278
- Option three is disabled
279
- </label>
280
- </div>
281
- </form>
297
+ <div class="bs-example bs-sheet" data-example-id="forms-example-checkboxes-radios">
298
+ <form>
299
+ <div class="checkbox">
300
+ <label>
301
+ <input type="checkbox" value="">
302
+ Option one is this and that&mdash;be sure to include why it's great
303
+ </label>
304
+ </div>
305
+ <div class="checkbox">
306
+ <label>
307
+ <input type="checkbox" value="" disabled>
308
+ Option two is disabled
309
+ </label>
310
+ </div>
311
+ <br>
312
+ <div class="radio">
313
+ <label>
314
+ <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
315
+ Option one is this and that&mdash;be sure to include why it's great
316
+ </label>
317
+ </div>
318
+ <div class="radio">
319
+ <label>
320
+ <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
321
+ Option two can be something else and selecting it will deselect option one
322
+ </label>
323
+ </div>
324
+ <div class="radio">
325
+ <label>
326
+ <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
327
+ Option three is disabled
328
+ </label>
329
+ </div>
330
+ </form>
331
+ </div>
282
332
  </div>
283
333
 
284
334
  ~~~ html
@@ -315,34 +365,39 @@ Disabled checkboxes and radios are supported, but to provide a "not-allowed" cur
315
365
  </div>
316
366
  ~~~
317
367
 
318
- #### Inline checkboxes and radios
368
+ <div class="example">
369
+ <div class="sheet-header">
370
+ <h3 id="forms-example-inline-checkboxes-radios">Inline checkboxes and radios</h3>
371
+ </div>
319
372
 
320
- Use the `.checkbox-inline` or `.radio-inline` classes on a series of checkboxes or radios for controls that appear on the same line.
373
+ <p>Use the <code>.checkbox-inline</code> or <code>.radio-inline</code> classes on a series of
374
+ checkboxes or radios for controls that appear on the same line.</p>
321
375
 
322
- <div class="example">
323
- <form>
324
- <label class="checkbox-inline">
325
- <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
326
- </label>
327
- <label class="checkbox-inline">
328
- <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
329
- </label>
330
- <label class="checkbox-inline">
331
- <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
332
- </label>
333
- </form>
334
- <br>
335
- <form>
336
- <label class="radio-inline">
337
- <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value=" option1"> 1
338
- </label>
339
- <label class="radio-inline">
340
- <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value=" option2"> 2
341
- </label>
342
- <label class="radio-inline">
343
- <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value=" option3"> 3
344
- </label>
345
- </form>
376
+ <div class="bs-example bs-sheet" data-example-id="forms-example-inline-checkboxes-radios">
377
+ <form>
378
+ <label class="checkbox-inline">
379
+ <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
380
+ </label>
381
+ <label class="checkbox-inline">
382
+ <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
383
+ </label>
384
+ <label class="checkbox-inline">
385
+ <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
386
+ </label>
387
+ </form>
388
+ <br>
389
+ <form>
390
+ <label class="radio-inline">
391
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value=" option1"> 1
392
+ </label>
393
+ <label class="radio-inline">
394
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value=" option2"> 2
395
+ </label>
396
+ <label class="radio-inline">
397
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value=" option3"> 3
398
+ </label>
399
+ </form>
400
+ </div>
346
401
  </div>
347
402
 
348
403
  ~~~ html
@@ -367,23 +422,36 @@ Use the `.checkbox-inline` or `.radio-inline` classes on a series of checkboxes
367
422
  </label>
368
423
  ~~~
369
424
 
370
- #### Checkboxes and radios without label text
425
+ <div class="example">
426
+ <div class="sheet-header">
427
+ <h3 id="forms-example-checkboxes-radios-without-label">
428
+ Checkboxes and radios without label text
429
+ </h3>
430
+ </div>
371
431
 
372
- Should you have no text within the `<label>`, the input is positioned as you'd expect. <strong>Currently only works on non-inline checkboxes and radios.</strong> Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`).
432
+ <p>Should you have no text within the <code>&lt;label&gt;</code>, the input is positioned as
433
+ you'd expect. Remember to still provide some form of label for assistive technologies
434
+ (for instance, using <code>aria-label</code>).</p>
373
435
 
374
- <div class="example">
375
- <form>
376
- <div class="checkbox">
377
- <label>
378
- <input type="checkbox" id="blankCheckbox" value="option1" aria-label=" Checkbox without label text">
379
- </label>
380
- </div>
381
- <div class="radio">
382
- <label>
383
- <input type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="Radio button without label text">
384
- </label>
385
- </div>
386
- </form>
436
+ <div class="bs-callout bs-callout-info">
437
+ <h4>Limitation</h4>
438
+ <p>Currently only works on non-inline checkboxes and radios.</p>
439
+ </div>
440
+
441
+ <div class="bs-example bs-sheet" data-example-id="forms-example-checkboxes-radios-without-label">
442
+ <form>
443
+ <div class="checkbox">
444
+ <label>
445
+ <input type="checkbox" id="blankCheckbox" value="option1" aria-label=" Checkbox without label text">
446
+ </label>
447
+ </div>
448
+ <div class="radio">
449
+ <label>
450
+ <input type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="Radio button without label text">
451
+ </label>
452
+ </div>
453
+ </form>
454
+ </div>
387
455
  </div>
388
456
 
389
457
  ~~~ html
@@ -399,20 +467,31 @@ Should you have no text within the `<label>`, the input is positioned as you'd e
399
467
  </div>
400
468
  ~~~
401
469
 
402
- ### Selects
470
+ <div class="example">
471
+ <div class="sheet-header">
472
+ <h3 id="forms-example-select">Select</h3>
473
+ </div>
403
474
 
404
- Note that many native select menus—namely in Safari and Chrome—have rounded corners that cannot be modified via `border-radius` properties.
475
+ <p>Note that many native select menus—namely in Safari and Chrome—have rounded corners that
476
+ cannot be modified via <code>border-radius</code> properties.</p>
405
477
 
406
- <div class="example">
407
- <form>
408
- <select class="form-control">
409
- <option>1</option>
410
- <option>2</option>
411
- <option>3</option>
412
- <option>4</option>
413
- <option>5</option>
414
- </select>
415
- </form>
478
+ <div class="bs-callout bs-callout-info">
479
+ <h4>Chosen</h4>
480
+ <p>Using Chosen is recommended for a better design and improved experience. More details in
481
+ the <a href="/components/#chosen">Chosen component</a>.</p>
482
+ </div>
483
+
484
+ <div class="bs-example bs-sheet" data-example-id="forms-example-select">
485
+ <form>
486
+ <select class="form-control">
487
+ <option>1</option>
488
+ <option>2</option>
489
+ <option>3</option>
490
+ <option>4</option>
491
+ <option>5</option>
492
+ </select>
493
+ </form>
494
+ </div>
416
495
  </div>
417
496
 
418
497
  ~~~ html
@@ -425,18 +504,31 @@ Note that many native select menus—namely in Safari and Chrome—have rounded
425
504
  </select>
426
505
  ~~~
427
506
 
428
- For `<select>` controls with the `multiple` attribute, multiple options are shown by default.
429
-
430
507
  <div class="example">
431
- <form>
432
- <select multiple class="form-control">
433
- <option>1</option>
434
- <option>2</option>
435
- <option>3</option>
436
- <option>4</option>
437
- <option>5</option>
438
- </select>
439
- </form>
508
+ <div class="sheet-header">
509
+ <h3 id="forms-example-multiple-select">Multiple Select</h3>
510
+ </div>
511
+
512
+ <p>For <code>&lt;select&gt;</code> controls with the <code>multiple</code> attribute,
513
+ multiple options are shown by default.</p>
514
+
515
+ <div class="bs-callout bs-callout-info">
516
+ <h4>Chosen</h4>
517
+ <p>Using Chosen is recommended for a better design and improved experience. More details in
518
+ the <a href="/components/#chosen">Chosen component</a>.</p>
519
+ </div>
520
+
521
+ <div class="bs-example bs-sheet" data-example-id="forms-example-multiple-select">
522
+ <form>
523
+ <select multiple class="form-control">
524
+ <option>1</option>
525
+ <option>2</option>
526
+ <option>3</option>
527
+ <option>4</option>
528
+ <option>5</option>
529
+ </select>
530
+ </form>
531
+ </div>
440
532
  </div>
441
533
 
442
534
  ~~~ html
@@ -449,22 +541,27 @@ For `<select>` controls with the `multiple` attribute, multiple options are show
449
541
  </select>
450
542
  ~~~
451
543
 
452
- ## Static control
544
+ <div class="example">
545
+ <div class="sheet-header">
546
+ <h3 id="forms-example-static">Static control</h3>
547
+ </div>
453
548
 
454
- When you need to place plain text next to a form label within a form, use the `.form-control-static` class on a `<p>`.
549
+ <p>When you need to place plain text next to a form label within a form, use the
550
+ <code>.form-control-static</code> class on a <code>&lt;p&gt;.</code></p>
455
551
 
456
- <div class="example">
457
- <form class="form-inline">
458
- <div class="form-group">
459
- <label class="sr-only">Email</label>
460
- <p class="form-control-static">email@example.com</p>
461
- </div>
462
- <div class="form-group">
463
- <label for="inputPassword2" class="sr-only">Password</label>
464
- <input type="password" class="form-control" id="inputPassword2" placeholder="Password">
465
- </div>
466
- <button type="submit" class="btn btn-default">Confirm identity</button>
467
- </form>
552
+ <div class="bs-example bs-sheet" data-example-id="forms-example-static">
553
+ <form class="form-inline">
554
+ <div class="form-group">
555
+ <label class="sr-only">Email</label>
556
+ <p class="form-control-static">email@example.com</p>
557
+ </div>
558
+ <div class="form-group">
559
+ <label for="inputPassword2" class="sr-only">Password</label>
560
+ <input type="password" class="form-control" id="inputPassword2" placeholder="Password">
561
+ </div>
562
+ <button type="submit" class="btn btn-default">Confirm identity</button>
563
+ </form>
564
+ </div>
468
565
  </div>
469
566
 
470
567
  ~~~ html
@@ -481,24 +578,36 @@ When you need to place plain text next to a form label within a form, use the `.
481
578
  </form>
482
579
  ~~~
483
580
 
484
- ## Focus state
581
+ <div class="example">
582
+ <div class="sheet-header">
583
+ <h3 id="forms-example-focus">Focus state</h3>
584
+ </div>
485
585
 
486
- We remove the default `outline` styles on some form controls and adjust labels and border-bottom placement and color for `:focus`.
586
+ <p>We remove the default <code>outline</code> styles on some form controls and adjust labels
587
+ and border-bottom placement and color for <code>:focus</code>.</p>
487
588
 
488
- <div class="example">
489
- <form>
490
- <div class="form-group focused">
491
- <label for="focusedInput2">Focus state</label>
492
- <input class="form-control" id="focusedInput2" type="text"
493
- value="Demonstrative focus state">
494
- </div>
495
- <div class="form-group focused">
496
- <label for="focusedTextarea">Comment</label>
497
- <textarea class="form-control" id="focusedTextarea" rows="5">
589
+ <div class="bs-callout bs-callout-info">
590
+ <h4>Demo <code>:focus</code> state</h4>
591
+ <p>The above example forces the <code>focused</code> class normally set by javascript on the
592
+ <code>.form-group</code> parent to demonstrate the <code>:focus</code> state on a
593
+ <code>.form-group .form-control</code>.</p>
594
+ </div>
595
+
596
+ <div class="bs-example bs-sheet" data-example-id="forms-example-focus">
597
+ <form>
598
+ <div class="form-group focused">
599
+ <label for="focusedInput2">Focus state</label>
600
+ <input class="form-control" id="focusedInput2" type="text"
601
+ value="Demonstrative focus state">
602
+ </div>
603
+ <div class="form-group focused">
604
+ <label for="focusedTextarea">Comment</label>
605
+ <textarea class="form-control" id="focusedTextarea" rows="5">
498
606
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
499
- </textarea>
500
- </div>
501
- </form>
607
+ </textarea>
608
+ </div>
609
+ </form>
610
+ </div>
502
611
  </div>
503
612
 
504
613
  ~~~ html
@@ -515,27 +624,33 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam
515
624
  </div>
516
625
  ~~~
517
626
 
518
- <div class="bs-callout bs-callout-info">
519
- <h4>Demo <code>:focus</code> state</h4>
520
- <p>The above example forces the <code>focused</code> class normally set by javascript on the <code>.form-group</code> parent to demonstrate the <code>:focus</code> state on a <code>.form-group .form-control</code>.</p>
521
- </div>
627
+ <div class="example">
628
+ <div class="sheet-header">
629
+ <h3 id="forms-example-filled">Filled state</h3>
630
+ </div>
522
631
 
523
- ## Filled state
632
+ <div class="bs-callout bs-callout-info">
633
+ <h4>Demo filled state</h4>
634
+ <p>The above example forces the <code>filled</code> class normally set by javascript on the
635
+ <code>.form-froup</code> parent to demonstrate the filled state on a
636
+ <code>.form-group .form-control</code>.</p>
637
+ </div>
524
638
 
525
- <div class="example">
526
- <form>
527
- <div class="form-group filled">
528
- <label for="filledInput">Filled state</label>
529
- <input class="form-control" id="filledInput" type="text"
530
- value="Demonstrative filled state">
531
- </div>
532
- <div class="form-group filled">
533
- <label for="filledTextarea">Comment</label>
534
- <textarea class="form-control" id="filledTextarea" rows="5">
639
+ <div class="bs-example bs-sheet" data-example-id="forms-example-filled">
640
+ <form>
641
+ <div class="form-group filled">
642
+ <label for="filledInput">Filled state</label>
643
+ <input class="form-control" id="filledInput" type="text"
644
+ value="Demonstrative filled state">
645
+ </div>
646
+ <div class="form-group filled">
647
+ <label for="filledTextarea">Comment</label>
648
+ <textarea class="form-control" id="filledTextarea" rows="5">
535
649
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
536
- </textarea>
537
- </div>
538
- </form>
650
+ </textarea>
651
+ </div>
652
+ </form>
653
+ </div>
539
654
  </div>
540
655
 
541
656
  ~~~ html
@@ -552,48 +667,48 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam
552
667
  </div>
553
668
  ~~~
554
669
 
555
- <div class="bs-callout bs-callout-info" id="callout-filled-demo">
556
- <h4>Demo filled state</h4>
557
- <p>The above example forces the <code>filled</code> class normally set by javascript on the <code>.form-froup</code> parent to demonstrate the filled state on a <code>.form-group .form-control</code>.</p>
558
- </div>
559
-
560
- ## Disabled state
670
+ <div class="example">
671
+ <div class="sheet-header">
672
+ <h3 id="forms-example-disabled">Disabled state</h3>
673
+ </div>
561
674
 
562
- Add the `disabled` boolean attribute on an input to prevent user interactions. Disabled inputs appear lighter and add a `not-allowed` cursor.
675
+ <p>Add the <code>disabled</code> boolean attribute on an input to prevent user interactions.
676
+ Disabled inputs appear lighter and add a <code>not-allowed</code> cursor.</p>
563
677
 
564
- <div class="example">
565
- <form>
566
- <div class="form-group">
567
- <label for="disabledInput">Disabled state</label>
568
- <input class="form-control" id="disabledInput" type="text"
569
- value="Disabled input here…" disabled>
570
- </div>
571
- <div class="form-group">
572
- <label for="disabledEmptyInput">Disabled state on empty input</label>
573
- <input class="form-control" id="disabledEmptyInput" type="text" disabled>
574
- </div>
575
- <div class="form-group">
576
- <label for="disabledTextarea">Disabled comment</label>
577
- <textarea class="form-control" id="disabledTextarea" rows="5" disabled>
678
+ <div class="bs-example bs-sheet" data-example-id="forms-example-disabled">
679
+ <form>
680
+ <div class="form-group">
681
+ <label for="disabledInput">Disabled state</label>
682
+ <input class="form-control" id="disabledInput" type="text"
683
+ value="Disabled input here…" disabled>
684
+ </div>
685
+ <div class="form-group">
686
+ <label for="disabledEmptyInput">Disabled state on empty input</label>
687
+ <input class="form-control" id="disabledEmptyInput" type="text" disabled>
688
+ </div>
689
+ <div class="form-group">
690
+ <label for="disabledTextarea">Disabled comment</label>
691
+ <textarea class="form-control" id="disabledTextarea" rows="5" disabled>
578
692
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
579
- </textarea>
580
- </div>
581
- <div class="form-group">
582
- <label for="disabledEmptyTextarea">Disabled comment on empty textarea</label>
583
- <textarea class="form-control" id="disabledEmptyTextarea" rows="5" disabled ></textarea>
584
- </div>
585
- <div class="form-group">
586
- <label for="disabledSelect">Disabled select menu</label>
587
- <select id="disabledSelect" class="form-control" disabled>
588
- <option>Disabled select</option>
589
- </select>
590
- </div>
591
- <div class="checkbox">
592
- <label>
593
- <input type="checkbox" disabled> Can't check this
594
- </label>
595
- </div>
596
- </form>
693
+ </textarea>
694
+ </div>
695
+ <div class="form-group">
696
+ <label for="disabledEmptyTextarea">Disabled comment on empty textarea</label>
697
+ <textarea class="form-control" id="disabledEmptyTextarea" rows="5" disabled ></textarea>
698
+ </div>
699
+ <div class="form-group">
700
+ <label for="disabledSelect">Disabled select menu</label>
701
+ <select id="disabledSelect" class="form-control" disabled>
702
+ <option>Disabled select</option>
703
+ </select>
704
+ </div>
705
+ <div class="checkbox">
706
+ <label>
707
+ <input type="checkbox" disabled> Can't check this
708
+ </label>
709
+ </div>
710
+ </form>
711
+ </div>
597
712
  </div>
598
713
 
599
714
  ~~~ html
@@ -629,56 +744,74 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam
629
744
  </div>
630
745
  ~~~
631
746
 
632
- ### Disabled fieldsets
633
-
634
- Add the `disabled` attribute to a `<fieldset>` to disable all the controls within the `<fieldset>` at once.
747
+ <div class="example">
748
+ <div class="sheet-header">
749
+ <h3 id="forms-example-disabled-fieldsets">Disabled fieldsets</h3>
750
+ </div>
635
751
 
636
- <div class="bs-callout bs-callout-warning">
637
- <h4>Caveat about link functionality of <code>&lt;a&gt;</code></h4>
638
- <p>By default, browsers will treat all native form controls (<code>&lt;input&gt;</code>, <code>&lt;select&gt;</code> and `<code>&lt;button&gt;</code>` elements) inside a <code>&lt;fieldset disabled&gt;</code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code>&lt;a ... class="btn btn-*"&gt;</code> elements, these will only be given a style of `pointer-events: none`. As noted in the section about <a href="#buttons-disabled">disabled state for buttons</a> (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.</p>
639
- </div>
752
+ <p>Add the <code>disabled</code> attribute to a <code>&lt;fieldset&gt;</code> to disable all
753
+ the controls within the <code>&lt;fieldset&gt;</code> at once.</p>
754
+
755
+ <div class="bs-callout bs-callout-warning">
756
+ <h4>Caveat about link functionality of <code>&lt;a&gt;</code></h4>
757
+ <p>By default, browsers will treat all native form controls (<code>&lt;input&gt;</code>,
758
+ <code>&lt;select&gt;</code> and `<code>&lt;button&gt;</code>` elements) inside a
759
+ <code>&lt;fieldset disabled&gt;</code> as disabled, preventing both keyboard and mouse
760
+ interactions on them. However, if your form also includes
761
+ <code>&lt;a ... class="btn btn-*"&gt;</code> elements, these will only be given a style
762
+ of <code>pointer-events: none</code>. As noted in the section about
763
+ <a href="#buttons-disabled">disabled state for buttons</a> (and specifically in the
764
+ sub-section for anchor elements), this CSS property is not yet standardized and isn't
765
+ fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent
766
+ keyboard users from being able to focus or activate these links. So to be safe, use
767
+ custom JavaScript to disable such links.</p>
768
+ </div>
640
769
 
641
- <div class="bs-callout bs-callout-danger">
642
- <h4>Cross-browser compatibility</h4>
643
- <p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code>&lt;fieldset&gt;</code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
644
- </div>
770
+ <div class="bs-callout bs-callout-danger">
771
+ <h4>Cross-browser compatibility</h4>
772
+ <p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below
773
+ don't fully support the <code>disabled</code> attribute on a <code>&lt;fieldset&gt;</code>.
774
+ Use custom JavaScript to disable the fieldset in these browsers.</p>
775
+ </div>
645
776
 
646
- <div class="example">
647
- <form>
648
- <fieldset disabled>
649
- <div class="form-group">
650
- <label for="disabledInputFromFieldset">Disabled state</label>
651
- <input class="form-control" id="disabledInputFromFieldset" type="text" value="Disabled input here…">
652
- </div>
653
- <div class="form-group">
654
- <label for="disabledEmptyInputFromFieldset">Disabled state on empty input</label>
655
- <input class="form-control" id="disabledEmptyInputFromFieldset" type="text">
656
- </div>
657
- <div class="form-group">
658
- <label for="disabledTextareaFromFieldset">Disabled comment</label>
659
- <textarea class="form-control" id="disabledTextareaFromFieldset" rows="5">
777
+ <div class="bs-example bs-sheet" data-example-id="forms-example-disabled-fieldsets">
778
+ <form>
779
+ <fieldset disabled>
780
+ <div class="form-group">
781
+ <label for="disabledInputFromFieldset">Disabled state</label>
782
+ <input class="form-control" id="disabledInputFromFieldset" type="text"
783
+ value="Disabled input here…">
784
+ </div>
785
+ <div class="form-group">
786
+ <label for="disabledEmptyInputFromFieldset">Disabled state on empty input</label>
787
+ <input class="form-control" id="disabledEmptyInputFromFieldset" type="text">
788
+ </div>
789
+ <div class="form-group">
790
+ <label for="disabledTextareaFromFieldset">Disabled comment</label>
791
+ <textarea class="form-control" id="disabledTextareaFromFieldset" rows="5">
660
792
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
661
- </textarea>
662
- </div>
663
- <div class="form-group">
664
- <label for="disabledEmptyTextareaFromFieldset">Disabled comment on empty textarea</label>
665
- <textarea class="form-control" id="disabledEmptyTextareaFromFieldset"
666
- rows="5" disabled></textarea>
667
- </div>
668
- <div class="form-group">
669
- <label for="disabledSelectFromFieldset">Disabled select menu</label>
670
- <select id="disabledSelectFromFieldset" class="form-control">
671
- <option>Disabled select</option>
672
- </select>
673
- </div>
674
- <div class="checkbox">
675
- <label>
676
- <input type="checkbox"> Can't check this
677
- </label>
678
- </div>
679
- <button type="submit" class="btn btn-primary">Submit</button>
680
- </fieldset>
681
- </form>
793
+ </textarea>
794
+ </div>
795
+ <div class="form-group">
796
+ <label for="disabledEmptyTextareaFromFieldset">Disabled comment on empty textarea</label>
797
+ <textarea class="form-control" id="disabledEmptyTextareaFromFieldset"
798
+ rows="5" disabled></textarea>
799
+ </div>
800
+ <div class="form-group">
801
+ <label for="disabledSelectFromFieldset">Disabled select menu</label>
802
+ <select id="disabledSelectFromFieldset" class="form-control">
803
+ <option>Disabled select</option>
804
+ </select>
805
+ </div>
806
+ <div class="checkbox">
807
+ <label>
808
+ <input type="checkbox"> Can't check this
809
+ </label>
810
+ </div>
811
+ <button type="submit" class="btn btn-primary">Submit</button>
812
+ </fieldset>
813
+ </form>
814
+ </div>
682
815
  </div>
683
816
 
684
817
  ~~~ html
@@ -719,32 +852,38 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam
719
852
  </form>
720
853
  ~~~
721
854
 
722
- ## Readonly state
855
+ <div class="example">
856
+ <div class="sheet-header">
857
+ <h3 id="forms-example-readonly">Readonly state</h3>
858
+ </div>
723
859
 
724
- Add the `readonly` boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.
860
+ <p>Add the <code>readonly</code> boolean attribute on an input to prevent modification of
861
+ the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain
862
+ the standard cursor.</p>
725
863
 
726
- <div class="example">
727
- <form>
728
- <div class="form-group">
729
- <label for="readonlyInput">Readonly state</label>
730
- <input class="form-control" id="readonlyInput" type="text"
731
- value="Readonly input here…" readonly>
732
- </div>
733
- <div class="form-group">
734
- <label for="readonlyEmptyInput">Readonly state on empty input</label>
735
- <input class="form-control" id="readonlyEmptyInput" type="text" readonly>
736
- </div>
737
- <div class="form-group">
738
- <label for="readonlyTextarea">Readonly comment</label>
739
- <textarea class="form-control" id="readonlyTextarea" rows="5" readonly>
864
+ <div class="bs-example bs-sheet" data-example-id="forms-example-readonly">
865
+ <form>
866
+ <div class="form-group">
867
+ <label for="readonlyInput">Readonly state</label>
868
+ <input class="form-control" id="readonlyInput" type="text"
869
+ value="Readonly input here…" readonly>
870
+ </div>
871
+ <div class="form-group">
872
+ <label for="readonlyEmptyInput">Readonly state on empty input</label>
873
+ <input class="form-control" id="readonlyEmptyInput" type="text" readonly>
874
+ </div>
875
+ <div class="form-group">
876
+ <label for="readonlyTextarea">Readonly comment</label>
877
+ <textarea class="form-control" id="readonlyTextarea" rows="5" readonly>
740
878
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
741
- </textarea>
742
- </div>
743
- <div class="form-group">
744
- <label for="readonlyEmptyTextarea">Readonly comment on empty textarea</label>
745
- <textarea class="form-control" id="readonlyEmptyTextarea" rows="5" readonly></textarea>
746
- </div>
747
- </form>
879
+ </textarea>
880
+ </div>
881
+ <div class="form-group">
882
+ <label for="readonlyEmptyTextarea">Readonly comment on empty textarea</label>
883
+ <textarea class="form-control" id="readonlyEmptyTextarea" rows="5" readonly></textarea>
884
+ </div>
885
+ </form>
886
+ </div>
748
887
  </div>
749
888
 
750
889
  ~~~ html
@@ -769,24 +908,31 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam
769
908
  </div>
770
909
  ~~~
771
910
 
911
+ <div class="example">
912
+ <div class="sheet-header">
913
+ <h3 id="forms-example-help-text">Help text</h3>
914
+ </div>
772
915
 
773
- ## Help text
774
-
775
- Block level help text for form controls.
916
+ <p>Block level help text for form controls.</p>
776
917
 
777
- <div class="bs-callout bs-callout-info">
778
- <h4>Associating help text with form controls</h4>
779
- <p>Help text should be explicitly associated with the form control it relates to using the <code>aria-describedby</code> attribute. This will ensure that assistive technologies – such as screen readers – will announce this help text when the user focuses or enters the control.</p>
780
- </div>
918
+ <div class="bs-callout bs-callout-info">
919
+ <h4>Associating help text with form controls</h4>
920
+ <p>Help text should be explicitly associated with the form control it relates to using the
921
+ <code>aria-describedby</code> attribute. This will ensure that assistive technologies – such
922
+ as screen readers – will announce this help text when the user focuses or enters the
923
+ control.</p>
924
+ </div>
781
925
 
782
- <div class="example">
783
- <form>
784
- <div class="form-group">
785
- <label for="inputHelpBlock">Input with help text</label>
786
- <input type="text" id="inputHelpBlock" class="form-control" aria-describedby="helpBlock">
787
- </div>
788
- <span id="helpBlock" class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
789
- </form>
926
+ <div class="bs-example bs-sheet" data-example-id="forms-example-help-text">
927
+ <form>
928
+ <div class="form-group">
929
+ <label for="inputHelpBlock">Input with help text</label>
930
+ <input type="text" id="inputHelpBlock" class="form-control" aria-describedby="helpBlock">
931
+ </div>
932
+ <span id="helpBlock" class="help-block">A block of help text that breaks onto a new line
933
+ and may extend beyond one line.</span>
934
+ </form>
935
+ </div>
790
936
  </div>
791
937
 
792
938
  ~~~ html
@@ -796,56 +942,58 @@ Block level help text for form controls.
796
942
  <span id="helpBlock" class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
797
943
  ~~~
798
944
 
799
- ## Validation states
800
-
801
- Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add `.has-warning`, `.has-error`, or `.has-success` to the parent element. Any `.control-label`, `.form-control`, and `.help-block` within that element will receive the validation styles.
802
-
803
- <div class="bs-callout bs-callout-warning">
804
- <h4>Conveying validation state to assistive technologies and colorblind users</h4>
805
- <p>Using these validation styles to denote the state of a form control only provides a visual, color-based indication, which will not be conveyed to users of assistive technologies - such as screen readers - or to colorblind users.</p>
806
- <p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code>&lt;label&gt;</code> text itself (as is the case in the following code example), include a <a href="../components/#glyphicons">Glyphicon</a> (with appropriate alternative text using the <code>.sr-only</code> class - see the <a href="../components/#glyphicons-examples">Glyphicon examples</a>), or by providing an additional <a href="#forms-help-text">help text</a> block. Specifically for assistive technologies, invalid form controls can also be assigned an <code>aria-invalid="true"</code> attribute.</p>
807
- </div>
808
-
809
945
  <div class="example">
810
- <form>
811
- <div class="form-group has-success">
812
- <label class="control-label" for="inputSuccess1">Input with success</label>
813
- <input type="text" class="form-control" id="inputSuccess1" aria-describedby ="helpBlock2">
814
- <span id="helpBlock2" class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
815
- </div>
816
- <div class="form-group has-warning">
817
- <label class="control-label" for="inputWarning1">Input with warning</label>
818
- <input type="text" class="form-control" id="inputWarning1">
819
- </div>
820
- <div class="form-group has-error">
821
- <label class="control-label" for="inputError1">Input with error</label>
822
- <input type="text" class="form-control" id="inputError1">
823
- </div>
824
- <div class="has-success">
825
- <div class="checkbox">
826
- <label>
827
- <input type="checkbox" id="checkboxSuccess" value="option1">
828
- Checkbox with success
829
- </label>
946
+ <div class="sheet-header">
947
+ <h3 id="forms-example-validation">Validation states</h3>
948
+ </div>
949
+
950
+ <p>Bootstrap includes validation styles for error, warning, and success states on form controls.
951
+ To use, add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code>
952
+ to the parent element. Any <code>.control-label</code>, <code>.form-control</code>, and
953
+ <code>.help-block</code> within that element will receive the validation styles.</p>
954
+
955
+ <div class="bs-example bs-sheet" data-example-id="forms-example-validation">
956
+ <form>
957
+ <div class="form-group has-success">
958
+ <label class="control-label" for="inputSuccess1">Input with success</label>
959
+ <input type="text" class="form-control" id="inputSuccess1" aria-describedby ="helpBlock2">
960
+ <span id="helpBlock2" class="help-block">A block of help text that breaks onto a new
961
+ line and may extend beyond one line.</span>
830
962
  </div>
831
- </div>
832
- <div class="has-warning">
833
- <div class="checkbox">
834
- <label>
835
- <input type="checkbox" id="checkboxWarning" value="option1">
836
- Checkbox with warning
837
- </label>
963
+ <div class="form-group has-warning">
964
+ <label class="control-label" for="inputWarning1">Input with warning</label>
965
+ <input type="text" class="form-control" id="inputWarning1">
838
966
  </div>
839
- </div>
840
- <div class="has-error">
841
- <div class="checkbox">
842
- <label>
843
- <input type="checkbox" id="checkboxError" value="option1">
844
- Checkbox with error
845
- </label>
967
+ <div class="form-group has-error">
968
+ <label class="control-label" for="inputError1">Input with error</label>
969
+ <input type="text" class="form-control" id="inputError1">
846
970
  </div>
847
- </div>
848
- </form>
971
+ <div class="has-success">
972
+ <div class="checkbox">
973
+ <label>
974
+ <input type="checkbox" id="checkboxSuccess" value="option1">
975
+ Checkbox with success
976
+ </label>
977
+ </div>
978
+ </div>
979
+ <div class="has-warning">
980
+ <div class="checkbox">
981
+ <label>
982
+ <input type="checkbox" id="checkboxWarning" value="option1">
983
+ Checkbox with warning
984
+ </label>
985
+ </div>
986
+ </div>
987
+ <div class="has-error">
988
+ <div class="checkbox">
989
+ <label>
990
+ <input type="checkbox" id="checkboxError" value="option1">
991
+ Checkbox with error
992
+ </label>
993
+ </div>
994
+ </div>
995
+ </form>
996
+ </div>
849
997
  </div>
850
998
 
851
999
  ~~~ html
@@ -888,52 +1036,67 @@ Bootstrap includes validation styles for error, warning, and success states on f
888
1036
  </div>
889
1037
  ~~~
890
1038
 
891
- ### With optional icons
1039
+ <div class="example">
1040
+ <div class="sheet-header">
1041
+ <h3 id="forms-example-validation-with-icons">Validation with optional icons</h3>
1042
+ </div>
892
1043
 
893
- You can also add optional feedback icons with the addition of `.has-feedback` and the right icon.
1044
+ <p>You can also add optional feedback icons with the addition of <code>.has-feedback</code>
1045
+ and the right icon.</p>
894
1046
 
895
- <p><strong class="text-danger">Feedback icons only work with textual <code>&lt;input class="form-control"&gt;</code>`<input class="form-control"> elements.</strong></p>
1047
+ <div class="bs-callout bs-callout-danger">
1048
+ <h4>Requirements</h4>
1049
+ <p>Feedback icons only work with textual <code>&lt;input class="form-control"&gt;</code>
1050
+ elements.</p>
1051
+ </div>
896
1052
 
897
- <div class="bs-callout bs-callout-warning">
898
- <h4>Icons, labels, and input groups</h4>
899
- <p>Manual positioning of feedback icons is required for inputs without a label and for <a href="../components#input-groups">input groups</a> with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the <code>.sr-only</code> class. If you must do without labels, adjust the <code>top</code> value of the feedback icon. For input groups, adjust the <code>right</code> value to an appropriate pixel value depending on the width of your addon.</p>
900
- </div>
901
- <div class="bs-callout bs-callout-warning">
902
- <h4>Conveying the icon's meaning to assistive technologies</h4>
903
- <p>To ensure that assistive technologies – such as screen readers – correctly convey the meaning of an icon, additional hidden text should be included with the <code>.sr-only</code> class and explicitly associated with the form control it relates to using <code>aria-describedby</code>. Alternatively, ensure that the meaning (for instance, the fact that there is a warning for a particular text entry field) is conveyed in some other form, such as changing the text of the actual <code>&lt;label&gt;</code> associated with the form control.</p>
904
- <p>Although the following examples already mention the validation state of their respective form controls in the <code>&lt;label&gt;</code> text itself, the above technique (using <code>.sr-only</code> text and <code>aria-describedby</code>) has been included for illustrative purposes.</p>
905
- </div>
1053
+ <div class="bs-callout bs-callout-warning">
1054
+ <h4>Icons, labels, and input groups</h4>
1055
+ <p>Manual positioning of feedback icons is required for inputs without a label and for
1056
+ <a href="/css#input-groups">input groups</a> with an add-on on the right. You are strongly
1057
+ encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent
1058
+ labels from being displayed, hide them with the <code>.sr-only</code> class. If you must do
1059
+ without labels, adjust the <code>top</code> value of the feedback icon. For input groups,
1060
+ adjust the <code>right</code> value to an appropriate pixel value depending on the width of
1061
+ your addon.</p>
1062
+ </div>
906
1063
 
907
- <div class="example">
908
- <form>
909
- <div class="form-group has-success has-feedback">
910
- <label class="control-label" for="inputSuccess2">Input with success</label>
911
- <input type="text" class="form-control" id="inputSuccess2" aria-describedby ="inputSuccess2Status">
912
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden=" true"></span>
913
- <span id="inputSuccess2Status" class="sr-only">(success)</span>
914
- </div>
915
- <div class="form-group has-warning has-feedback">
916
- <label class="control-label" for="inputWarning2">Input with warning</label>
917
- <input type="text" class="form-control" id="inputWarning2" aria-describedby="inputWarning2Status">
918
- <span class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"></span>
919
- <span id="inputWarning2Status" class="sr-only">(warning)</span>
920
- </div>
921
- <div class="form-group has-error has-feedback">
922
- <label class="control-label" for="inputError2">Input with error</label>
923
- <input type="text" class="form-control" id="inputError2" aria-describedby="inputError2Status">
924
- <span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>
925
- <span id="inputError2Status" class="sr-only">(error)</span>
926
- </div>
927
- <div class="form-group has-success has-feedback">
928
- <div class="input-group">
929
- <span class="input-group-addon">@</span>
930
- <label class="control-label" for="inputGroupSuccess1">Input group with success</label>
931
- <input type="text" class="form-control" id="inputGroupSuccess1" aria-describedby="inputGroupSuccess1Status">
1064
+ <div class="bs-example bs-sheet" data-example-id="forms-example-validation-with-icons">
1065
+ <form>
1066
+ <div class="form-group has-success has-feedback">
1067
+ <label class="control-label" for="inputSuccess2">Input with success</label>
1068
+ <input type="text" class="form-control" id="inputSuccess2"
1069
+ aria-describedby="inputSuccess2Status">
1070
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1071
+ <span id="inputSuccess2Status" class="sr-only">(success)</span>
932
1072
  </div>
933
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
934
- <span id="inputGroupSuccess1Status" class="sr-only">(success)</span>
935
- </div>
936
- </form>
1073
+ <div class="form-group has-warning has-feedback">
1074
+ <label class="control-label" for="inputWarning2">Input with warning</label>
1075
+ <input type="text" class="form-control" id="inputWarning2"
1076
+ aria-describedby="inputWarning2Status">
1077
+ <span class="glyphicon glyphicon-warning-sign form-control-feedback"
1078
+ aria-hidden="true"></span>
1079
+ <span id="inputWarning2Status" class="sr-only">(warning)</span>
1080
+ </div>
1081
+ <div class="form-group has-error has-feedback">
1082
+ <label class="control-label" for="inputError2">Input with error</label>
1083
+ <input type="text" class="form-control" id="inputError2"
1084
+ aria-describedby="inputError2Status">
1085
+ <span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>
1086
+ <span id="inputError2Status" class="sr-only">(error)</span>
1087
+ </div>
1088
+ <div class="form-group has-success has-feedback">
1089
+ <div class="input-group">
1090
+ <span class="input-group-addon">@</span>
1091
+ <label class="control-label" for="inputGroupSuccess1">Input group with success</label>
1092
+ <input type="text" class="form-control" id="inputGroupSuccess1"
1093
+ aria-describedby="inputGroupSuccess1Status">
1094
+ </div>
1095
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1096
+ <span id="inputGroupSuccess1Status" class="sr-only">(success)</span>
1097
+ </div>
1098
+ </form>
1099
+ </div>
937
1100
  </div>
938
1101
 
939
1102
  ~~~ html
@@ -966,34 +1129,43 @@ You can also add optional feedback icons with the addition of `.has-feedback` an
966
1129
  </div>
967
1130
  ~~~
968
1131
 
969
- #### Optional icons in horizontal and inline forms
1132
+ <div class="example">
1133
+ <div class="sheet-header">
1134
+ <h3 id="forms-example-validation-with-icons-horizontal-inline">
1135
+ Validation with optional icons in horizontal and inline forms
1136
+ </h3>
1137
+ </div>
970
1138
 
971
- <div class="bs-callout bs-callout-info">
972
- <h4>Not Recommended</h4>
973
- <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
974
- </div>
1139
+ <div class="bs-callout bs-callout-info">
1140
+ <h4>Not Recommended</h4>
1141
+ <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
1142
+ </div>
975
1143
 
976
- <div class="example">
977
- <form class="form-inline">
978
- <div class="form-group has-success has-feedback">
979
- <label class="control-label" for="inputSuccess4">Input with success</label>
980
- <input type="text" class="form-control" id="inputSuccess4" aria-describedby="inputSuccess4Status">
981
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden=" true"></span>
982
- <span id="inputSuccess4Status" class="sr-only">(success)</span>
983
- </div>
984
- </form>
985
- <br>
986
- <form class="form-inline">
987
- <div class="form-group has-success has-feedback">
988
- <div class="input-group">
989
- <span class="input-group-addon">@</span>
990
- <label class="control-label" for="inputGroupSuccess3">Input group with success</label>
991
- <input type="text" class="form-control" id="inputGroupSuccess3" aria-describedby="inputGroupSuccess3Status">
1144
+ <div class="bs-example bs-sheet"
1145
+ data-example-id="forms-example-validation-with-icons-horizontal-inline">
1146
+ <form class="form-inline">
1147
+ <div class="form-group has-success has-feedback">
1148
+ <label class="control-label" for="inputSuccess4">Input with success</label>
1149
+ <input type="text" class="form-control" id="inputSuccess4"
1150
+ aria-describedby="inputSuccess4Status">
1151
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden=" true"></span>
1152
+ <span id="inputSuccess4Status" class="sr-only">(success)</span>
992
1153
  </div>
993
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
994
- <span id="inputGroupSuccess3Status" class="sr-only">(success)</span>
995
- </div>
996
- </form>
1154
+ </form>
1155
+ <br>
1156
+ <form class="form-inline">
1157
+ <div class="form-group has-success has-feedback">
1158
+ <div class="input-group">
1159
+ <span class="input-group-addon">@</span>
1160
+ <label class="control-label" for="inputGroupSuccess3">Input group with success</label>
1161
+ <input type="text" class="form-control" id="inputGroupSuccess3"
1162
+ aria-describedby="inputGroupSuccess3Status">
1163
+ </div>
1164
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1165
+ <span id="inputGroupSuccess3Status" class="sr-only">(success)</span>
1166
+ </div>
1167
+ </form>
1168
+ </div>
997
1169
  </div>
998
1170
 
999
1171
  ~~~ html
@@ -1018,72 +1190,33 @@ You can also add optional feedback icons with the addition of `.has-feedback` an
1018
1190
  </form>
1019
1191
  ~~~
1020
1192
 
1021
- #### Optional icons with hidden `.sr-only` labels
1022
-
1023
- If you use the `.sr-only` class to hide a form control's `<label>` (rather than using other labelling options, such as the `aria-label` attribute), Bootstrap will automatically adjust the position of the icon once it's been added.
1024
-
1025
1193
  <div class="example">
1026
- <div class="form-group has-success has-feedback">
1027
- <label class="control-label sr-only" for="inputSuccess5">Hidden label</label>
1028
- <input type="text" class="form-control" id="inputSuccess5" aria-describedby=" inputSuccess5Status" placeholder="Placeholder">
1029
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true" ></span>
1030
- <span id="inputSuccess5Status" class="sr-only">(success)</span>
1194
+ <div class="sheet-header">
1195
+ <h3 id="forms-example-height-sizing">Height sizing</h3>
1031
1196
  </div>
1032
- <div class="form-group has-success has-feedback">
1033
- <label class="control-label sr-only" for="inputGroupSuccess4">Input group with success</label>
1034
- <div class="input-group">
1035
- <span class="input-group-addon">@</span>
1036
- <input type="text" class="form-control" id="inputGroupSuccess4" aria-describedby="inputGroupSuccess4Status" placeholder="Placeholder">
1037
- </div>
1038
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1039
- <span id="inputGroupSuccess4Status" class="sr-only">(success)</span>
1040
- </div>
1041
- </div>
1042
1197
 
1043
- ~~~ html
1044
- <div class="form-group has-success has-feedback">
1045
- <label class="control-label sr-only" for="inputSuccess5">Hidden label</label>
1046
- <input type="text" class="form-control" id="inputSuccess5" aria-describedby="inputSuccess5Status">
1047
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1048
- <span id="inputSuccess5Status" class="sr-only">(success)</span>
1049
- </div>
1050
- <div class="form-group has-success has-feedback">
1051
- <label class="control-label sr-only" for="inputGroupSuccess4">Input group with success</label>
1052
- <div class="input-group">
1053
- <span class="input-group-addon">@</span>
1054
- <input type="text" class="form-control" id="inputGroupSuccess4" aria-describedby="inputGroupSuccess4Status">
1055
- </div>
1056
- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1057
- <span id="inputGroupSuccess4Status" class="sr-only">(success)</span>
1058
- </div>
1059
- ~~~
1060
-
1061
- ## Control sizing
1062
-
1063
- Set heights using classes like `.input-lg`, and set widths using grid column classes like `.col-lg-*`.
1064
-
1065
- ### Height sizing
1198
+ <p>Set heights using classes like <code>.input-lg</code>. Create taller or shorter form
1199
+ controls that match button sizes.</p>
1066
1200
 
1067
- Create taller or shorter form controls that match button sizes.
1201
+ <div class="bs-example bs-sheet" data-example-id="forms-example-height-sizing">
1202
+ <form>
1203
+ <div class="controls">
1204
+ <input class="form-control input-lg" type="text" placeholder=".input-lg">
1205
+ <input type="text" class="form-control" placeholder="Default input">
1206
+ <input class="form-control input-sm" type="text" placeholder=".input-sm">
1068
1207
 
1069
- <div class="example">
1070
- <form>
1071
- <div class="controls">
1072
- <input class="form-control input-lg" type="text" placeholder=".input-lg">
1073
- <input type="text" class="form-control" placeholder="Default input">
1074
- <input class="form-control input-sm" type="text" placeholder=".input-sm">
1075
-
1076
- <select class="form-control input-lg">
1077
- <option value="">.input-lg</option>
1078
- </select>
1079
- <select class="form-control">
1080
- <option value="">Default select</option>
1081
- </select>
1082
- <select class="form-control input-sm">
1083
- <option value="">.input-sm</option>
1084
- </select>
1085
- </div>
1086
- </form>
1208
+ <select class="form-control input-lg">
1209
+ <option value="">.input-lg</option>
1210
+ </select>
1211
+ <select class="form-control">
1212
+ <option value="">Default select</option>
1213
+ </select>
1214
+ <select class="form-control input-sm">
1215
+ <option value="">.input-sm</option>
1216
+ </select>
1217
+ </div>
1218
+ </form>
1219
+ </div>
1087
1220
  </div>
1088
1221
 
1089
1222
  ~~~ html
@@ -1096,31 +1229,40 @@ Create taller or shorter form controls that match button sizes.
1096
1229
  <select class="form-control input-sm">...</select>
1097
1230
  ~~~
1098
1231
 
1099
- ### Horizontal form group sizes
1232
+ <div class="example">
1233
+ <div class="sheet-header">
1234
+ <h3 id="forms-example-horizontal-group-sizes">Horizontal form group sizes</h3>
1235
+ </div>
1100
1236
 
1101
- <div class="bs-callout bs-callout-info">
1102
- <h4>Not Recommended</h4>
1103
- <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
1237
+ <div class="bs-callout bs-callout-info">
1238
+ <h4>Not Recommended</h4>
1239
+ <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
1240
+ </div>
1104
1241
  </div>
1105
1242
 
1106
- ### Column sizing
1107
-
1108
- Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.
1109
-
1110
1243
  <div class="example">
1111
- <form>
1112
- <div class="row">
1113
- <div class="col-xs-2">
1114
- <input type="text" class="form-control" placeholder=".col-xs-2">
1115
- </div>
1116
- <div class="col-xs-3">
1117
- <input type="text" class="form-control" placeholder=".col-xs-3">
1118
- </div>
1119
- <div class="col-xs-4">
1120
- <input type="text" class="form-control" placeholder=".col-xs-4">
1244
+ <div class="sheet-header">
1245
+ <h3 id="forms-example-column-sizing">Column sizing</h3>
1246
+ </div>
1247
+
1248
+ <p>Set widths using grid column classes like <code>.col-lg-*</code>. Wrap inputs in grid columns,
1249
+ or any custom parent element, to easily enforce desired widths.</p>
1250
+
1251
+ <div class="bs-example bs-sheet" data-example-id="forms-example-column-sizing">
1252
+ <form>
1253
+ <div class="row">
1254
+ <div class="col-xs-2">
1255
+ <input type="text" class="form-control" placeholder=".col-xs-2">
1256
+ </div>
1257
+ <div class="col-xs-3">
1258
+ <input type="text" class="form-control" placeholder=".col-xs-3">
1259
+ </div>
1260
+ <div class="col-xs-4">
1261
+ <input type="text" class="form-control" placeholder=".col-xs-4">
1262
+ </div>
1121
1263
  </div>
1122
- </div>
1123
- </form>
1264
+ </form>
1265
+ </div>
1124
1266
  </div>
1125
1267
 
1126
1268
  ~~~ html