Fix text ellipsis on single-mode LookupField (#1287)#1288
Merged
Conversation
The -input element is inline-flex, which preserves baseline alignment with adjacent fields/buttons but means text-overflow: ellipsis cannot apply to the container's text directly. Wrap the text/placeholder in a -text span and apply the ellipsis properties there. Closes #1287
✅ Deploy Preview for cxjs-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Summary
{text}in a<span class="cxe-lookupfield-text">inside the-inputdiv in single-selection modeoverflow: hidden,text-overflow: ellipsis,white-space: nowraponto the new-textclass-inputasdisplay: inline-flexso baseline alignment with adjacent fields/buttons is preservedThe regression was introduced in the "Redo themes" PR (#1281), which changed
-input's default display toinline-flex. Flex containers can't applytext-overflow: ellipsisto direct text children (they become anonymous flex items). Moving the ellipsis onto a styleable child span is the fix.Closes #1287
Test plan
LookupFieldhomedocs example, select an option long enough to overflow → text is ellipsized with…LookupFieldnext to aButtonor text label → baselines align-text)