Skip to content

Commit a9aca9f

Browse files
committed
Replace .form-select with .form-control
Replace usages of .form-select with .form-control across tests, examples, and docs. Update size variants (form-select-sm/lg -> form-control-sm/lg) and related comments in the floating-label visual test. Also adjust migration guide wording to reflect the consolidation. Files updated include js/tests/visual/floating-label.html, site/src/assets/examples/{cheatsheet,checkout,menus}/index.astro, and docs under site/src/content (components/toasts.mdx, forms/layout.mdx, forms/overview.mdx, guides/migration.mdx).
1 parent 5d9c88d commit a9aca9f

8 files changed

Lines changed: 37 additions & 37 deletions

File tree

js/tests/visual/floating-label.html

Lines changed: 20 additions & 20 deletions
Large diffs are not rendered by default.

site/src/assets/examples/cheatsheet/index.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export const body_class = 'bg-body-tertiary'
325325
</div>
326326
<div class="mb-3">
327327
<label for="exampleSelect" class="form-label">Select menu</label>
328-
<select class="form-select" id="exampleSelect">
328+
<select class="form-control" id="exampleSelect">
329329
<option selected>Open this select menu</option>
330330
<option value="1">One</option>
331331
<option value="2">Two</option>
@@ -379,7 +379,7 @@ export const body_class = 'bg-body-tertiary'
379379
</div>
380380
<div class="mb-3">
381381
<label for="disabledSelect" class="form-label">Disabled select menu</label>
382-
<select id="disabledSelect" class="form-select">
382+
<select id="disabledSelect" class="form-control">
383383
<option>Disabled select</option>
384384
</select>
385385
</div>
@@ -431,7 +431,7 @@ export const body_class = 'bg-body-tertiary'
431431
<input class="form-control form-control-lg" type="text" placeholder=".form-control-lg" aria-label=".form-control-lg example">
432432
</div>
433433
<div class="mb-3">
434-
<select class="form-select form-select-lg" aria-label=".form-select-lg example">
434+
<select class="form-control form-control-lg" aria-label=".form-control-lg example">
435435
<option selected>Open this select menu</option>
436436
<option value="1">One</option>
437437
<option value="2">Two</option>
@@ -447,7 +447,7 @@ export const body_class = 'bg-body-tertiary'
447447
<input class="form-control form-control-sm" type="text" placeholder=".form-control-sm" aria-label=".form-control-sm example">
448448
</div>
449449
<div class="mb-3">
450-
<select class="form-select form-select-sm" aria-label=".form-select-sm example">
450+
<select class="form-control form-control-sm" aria-label=".form-control-sm example">
451451
<option selected>Open this select menu</option>
452452
<option value="1">One</option>
453453
<option value="2">Two</option>
@@ -556,7 +556,7 @@ export const body_class = 'bg-body-tertiary'
556556
</div>
557557
<div class="md:col-3">
558558
<label for="validationServer04" class="form-label">State</label>
559-
<select class="form-select is-invalid" id="validationServer04" required>
559+
<select class="form-control is-invalid" id="validationServer04" required>
560560
<option selected disabled value="">Choose...</option>
561561
<option>...</option>
562562
</select>

site/src/assets/examples/checkout/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const body_class = 'bg-body-tertiary'
117117

118118
<div class="md:col-5">
119119
<label for="country" class="form-label">Country</label>
120-
<select class="form-select" id="country" required>
120+
<select class="form-control" id="country" required>
121121
<option value="">Choose...</option>
122122
<option>United States</option>
123123
</select>
@@ -128,7 +128,7 @@ export const body_class = 'bg-body-tertiary'
128128

129129
<div class="md:col-4">
130130
<label for="state" class="form-label">State</label>
131-
<select class="form-select" id="state" required>
131+
<select class="form-control" id="state" required>
132132
<option value="">Choose...</option>
133133
<option>California</option>
134134
</select>

site/src/assets/examples/menus/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const extra_css = ['menus.css']
181181
<svg class="bi" width="16" height="16" aria-hidden="true"><use href="#arrow-left-short"/></svg>
182182
</button>
183183
<strong class="cal-month-name">June</strong>
184-
<select class="form-select cal-month-name d-none">
184+
<select class="form-control cal-month-name d-none">
185185
<option value="January">January</option>
186186
<option value="February">February</option>
187187
<option value="March">March</option>
@@ -260,7 +260,7 @@ export const extra_css = ['menus.css']
260260
<svg class="bi" width="16" height="16" aria-hidden="true"><use href="#arrow-left-short"/></svg>
261261
</button>
262262
<strong class="cal-month-name">June</strong>
263-
<select class="form-select cal-month-name d-none">
263+
<select class="form-control cal-month-name d-none">
264264
<option value="January">January</option>
265265
<option value="February">February</option>
266266
<option value="March">March</option>

site/src/content/docs/components/toasts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Place toasts with custom CSS as you need them. The top right is often used for n
234234
<Example addStackblitzJs code={`<form>
235235
<div class="mb-3">
236236
<label for="selectToastPlacement">Toast placement</label>
237-
<select class="form-select mt-2" id="selectToastPlacement">
237+
<select class="form-control mt-2" id="selectToastPlacement">
238238
<option value="" selected>Select a position...</option>
239239
<option value="top-0 start-0">Top left</option>
240240
<option value="top-0 start-50 translate-middle-x">Top center</option>

site/src/content/docs/forms/layout.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ More complex layouts can also be created with the grid system.
7979
</div>
8080
<div class="md:col-4">
8181
<label for="inputState" class="form-label">State</label>
82-
<select id="inputState" class="form-select">
82+
<select id="inputState" class="form-control">
8383
<option selected>Choose...</option>
8484
<option>...</option>
8585
</select>
@@ -213,7 +213,7 @@ The example below uses a flexbox utility to vertically center the contents and c
213213
</div>
214214
<div class="col-auto">
215215
<label class="visually-hidden" for="autoSizingSelect">Preference</label>
216-
<select class="form-select" id="autoSizingSelect">
216+
<select class="form-control" id="autoSizingSelect">
217217
<option selected>Choose...</option>
218218
<option value="1">One</option>
219219
<option value="2">Two</option>
@@ -249,7 +249,7 @@ You can then remix that once again with size-specific column classes.
249249
</div>
250250
<div class="sm:col-3">
251251
<label class="visually-hidden" for="specificSizeSelect">Preference</label>
252-
<select class="form-select" id="specificSizeSelect">
252+
<select class="form-control" id="specificSizeSelect">
253253
<option selected>Choose...</option>
254254
<option value="1">One</option>
255255
<option value="2">Two</option>
@@ -284,7 +284,7 @@ Use the `.row-cols-*` classes to create responsive horizontal layouts. By adding
284284
285285
<div class="col-12">
286286
<label class="visually-hidden" for="inlineFormSelectPref">Preference</label>
287-
<select class="form-select" id="inlineFormSelectPref">
287+
<select class="form-control" id="inlineFormSelectPref">
288288
<option selected>Choose...</option>
289289
<option value="1">One</option>
290290
<option value="2">Two</option>

site/src/content/docs/forms/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ However, if your form also includes custom button-like elements such as `<a clas
6868
</div>
6969
<div class="mb-3">
7070
<label for="disabledSelect" class="form-label">Disabled select menu</label>
71-
<select id="disabledSelect" class="form-select">
71+
<select id="disabledSelect" class="form-control">
7272
<option>Disabled select</option>
7373
</select>
7474
</div>

site/src/content/docs/guides/migration.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ Bootstrap 6 is a major release with many breaking changes to modernize our codeb
229229
- Checkboxes now have a wrapping element and an SVG in the DOM for checked and indeterminate states. Radios and switches do not.
230230
- Revamped layout for checks, radios, and switches with labels (and descriptions). We now have custom elements for layout that include basic flexbox styling.
231231
- Refactored toggle buttons to use a nested input structure. The `.btn-check` class now goes on the label (not the input), with the input nested inside. This eliminates the need for `id`/`for` attributes and uses CSS `:has()` selector instead of sibling selectors. Example: `<label class="btn-check btn-solid theme-primary"><input type="checkbox">Toggle</label>`.
232-
- **Consolidate `.form-select` into `.form-control`.**
233-
- Removed `.form-select`—use `.form-control` on `<select>` elements now. Too much abstraction and duplication at the same time.
232+
- **Consolidate `.form-control` into `.form-control`.**
233+
- Removed `.form-control`—use `.form-control` on `<select>` elements now. Too much abstraction and duplication at the same time.
234234
- Adds new CSS variables on `.form-control` for easier customization without Sass compilation.
235235
- `.form-control` now has a `min-height` at all times as opposed to just on `<textarea>` elements. This reduces some CSS for us.
236236
- **Added new Combobox form component.** A searchable, filterable select with single and multi-select modes, built on top of the Menu component. See the [Combobox docs]([[docsref:/forms/combobox]]).

0 commit comments

Comments
 (0)