fix(ui5-text): unify truncation across all max-lines values#13624
Open
nnaydenow wants to merge 2 commits into
Open
fix(ui5-text): unify truncation across all max-lines values#13624nnaydenow wants to merge 2 commits into
nnaydenow wants to merge 2 commits into
Conversation
Collaborator
|
🚀 Deployed on https://pr-13624--ui5-webcomponents-preview.netlify.app |
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.
Previously, single-line truncation (max-lines="1") used a separate CSS. All other values relied on
-webkit-line-clampvia a:not([max-lines="1"])selector.This split caused inconsistent behavior and required two code paths for what is semantically the same feature. Since
-webkit-line-clamp: 1produces equivalent truncation to theinline-blockapproach, both cases are now handled by the single-webkit-line-clamppath.Infinityas the CSS variable value maps tononeon-webkit-line-clamp(browsers treat an unrecognised/non-integer value as unset), so the default "no truncation" behaviour is preserved without an explicit reset rule.The core reasoning: max-lines="1" no longer needs its own display/whitespace block — -webkit-line-clamp: 1 does the same job, and Infinity as a CSS value is treated as none/unset by the browser, so no truncation applies at the default.
In this change #13566 is reverted as well.
Fixes: #10721