Skip to content

v6: docs: Replace .form-select with .form-control#42332

Merged
mdo merged 2 commits into
twbs:v6-devfrom
coliff:dev/coliff/form-select-to-form-control
Apr 20, 2026
Merged

v6: docs: Replace .form-select with .form-control#42332
mdo merged 2 commits into
twbs:v6-devfrom
coliff:dev/coliff/form-select-to-form-control

Conversation

@coliff
Copy link
Copy Markdown
Contributor

@coliff coliff commented Apr 19, 2026

Updates the visual test file floating-label.html to replace all instances of the form-select class with form-control for <select> elements. This change ensures consistent styling and behavior for select elements within floating label form groups, aligning them with the rest of the form controls.

Select element class updates:

  • Replaced form-select with form-control for all <select> elements, including those with validation states (e.g., is-invalid), size modifiers (e.g., form-select-sm/form-select-lg to form-control-sm/form-control-lg), and disabled states.

Documentation/comments:

  • Updated inline comments to reference form-control instead of form-select where relevant.

These changes help standardize the markup and ensure that floating label select elements are tested with the same classes used in production.

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).
Copilot AI review requested due to automatic review settings April 19, 2026 09:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates documentation, examples, and a visual test fixture to reflect the form API change where <select> elements are styled with .form-control instead of .form-select.

Changes:

  • Update migration guide and forms docs examples to use .form-control on <select>.
  • Update Astro example pages (menus, checkout, cheatsheet) to replace .form-select usage.
  • Update the floating-label visual test HTML fixture to use .form-control for selects and adjust related comments/text.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
site/src/content/docs/guides/migration.mdx Updates migration guidance around select styling class (but currently contains an incorrect self-replacement).
site/src/content/docs/forms/overview.mdx Replaces .form-select with .form-control in disabled select example.
site/src/content/docs/forms/layout.mdx Replaces .form-select with .form-control in several layout examples.
site/src/content/docs/components/toasts.mdx Updates select class in toast placement example.
site/src/assets/examples/menus/index.astro Replaces .form-select with .form-control in menu/calendar examples.
site/src/assets/examples/checkout/index.astro Replaces .form-select with .form-control on country/state selects.
site/src/assets/examples/cheatsheet/index.astro Replaces .form-select usages (including size variants) with .form-control.
js/tests/visual/floating-label.html Replaces .form-select with .form-control for floating label select coverage and updates nearby comment text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread site/src/content/docs/guides/migration.mdx Outdated
@coliff coliff changed the title Replace .form-select with .form-control v6: docs: Replace .form-select with .form-control Apr 19, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@coliff
Copy link
Copy Markdown
Contributor Author

coliff commented Apr 19, 2026

I think this is good to go, but once (hopefully) approved/merged I'll be happy to do a follow up PR updating examples/docs with updates for checks/radios/switches to align with the new markup/class names!

@mdo mdo merged commit 1ea05f8 into twbs:v6-dev Apr 20, 2026
12 checks passed
@coliff coliff deleted the dev/coliff/form-select-to-form-control branch April 20, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

4 participants