v6: docs: Replace .form-select with .form-control#42332
Merged
Conversation
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).
There was a problem hiding this comment.
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-controlon<select>. - Update Astro example pages (menus, checkout, cheatsheet) to replace
.form-selectusage. - Update the floating-label visual test HTML fixture to use
.form-controlfor 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the visual test file
floating-label.htmlto replace all instances of theform-selectclass withform-controlfor<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:
form-selectwithform-controlfor all<select>elements, including those with validation states (e.g.,is-invalid), size modifiers (e.g.,form-select-sm/form-select-lgtoform-control-sm/form-control-lg), and disabled states.Documentation/comments:
form-controlinstead ofform-selectwhere relevant.These changes help standardize the markup and ensure that floating label select elements are tested with the same classes used in production.