refactor: extract shared select dropdown/list styles into central SCSS placeholders #5586
+77
−80
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.
Proposed changes
Eliminates code duplication between CustomSelect components and native select
::pickerpseudo-element by extracting common styles into shared SCSS placeholders.Created:
packages/components/src/styles/internal/_select-dropdown-components.scss%select-dropdown-container- Dropdown positioning, shadow, sizing, background%select-list-container- Overflow behavior and max-height calculation%select-list-item- Base item styles (padding, background, border-radius)%select-list-item-interaction- Hover/active statesUpdated components to extend placeholders:
select.scss-::picker(select)andoptionelementscustom-select-dropdown.scss- Dropdown containercustom-select-list.scss- List containercustom-select-list-item.scss- List itemsReduces ~50 lines of duplicated styles while ensuring consistency across both implementations.
resolves #3654
Types of changes
Further comments
Single source of truth for select dropdown/list styling. Future modifications only need to occur in one location.
❤️ Thank you!
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/copilot/sub-pr-4624