fix(web-components): fluent-dropdown control overflows when white-space: nowrap is inherited#36218
Draft
Copilot wants to merge 2 commits into
Draft
fix(web-components): fluent-dropdown control overflows when white-space: nowrap is inherited#36218Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
2 tasks
Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/ac1a543d-0323-44ef-853a-205d32282c2b Co-authored-by: Hotell <1223799+Hotell@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix fluent-dropdown text wrapping issue under white-space: nowrap
fix(web-components): fluent-dropdown control overflows when white-space: nowrap is inherited
May 18, 2026
chrisdholt
requested changes
May 18, 2026
Comment on lines
+108
to
+111
| min-width: 0; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; |
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.
In multiselect mode, a long display value combined with an inherited
white-space: nowrapfrom the host environment causes the slotted<button>to expand beyond the control's bounds, pushing the chevron indicator out of view.Root cause:
::slotted(:is(input, button))usedall: unset(which resetswhite-spacetoinherit) plusflex: 1 1 autowith nomin-widthconstraint — so the button could never shrink below its content width in the flex container.Changes
dropdown.styles.ts— Added to::slotted(:is(input, button)):min-width: 0— lets the flex item shrink below intrinsic content sizeoverflow: hidden+text-overflow: ellipsis— clips and truncates overflowing display valuewhite-space: nowrap— explicit override so the value never wraps regardless of inheritancedropdown.stories.ts— AddedMultipleSelectionOverflowstory: multiselect dropdown with several pre-selected options rendered inside awhite-space: nowrap; width: 300pxcontainer, directly reproducing the reported scenario.