Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(css): support for text-overflow #10369

Merged
merged 4 commits into from
Aug 27, 2023
Merged

Conversation

NathanWalker
Copy link
Contributor

@NathanWalker NathanWalker commented Aug 25, 2023

PR Checklist

What is the current behavior?

text-overflow was not supported. This means most buttons would truncate awkwardly like this by default:
Screenshot 2023-08-25 at 1 54 40 PM

What is the new behavior?

Adds support for standard CSS text-overflow to combine with white-space to achieve different truncation on text with labels and buttons. This allows you to set text-overflow: ellipsis to allow desired truncation:
Screenshot 2023-08-25 at 1 54 46 PM

ref: NativeScript/tailwind#189
closes #5487

@NathanWalker NathanWalker added this to the 8.6 milestone Aug 25, 2023
@NathanWalker NathanWalker self-assigned this Aug 25, 2023
@cla-bot cla-bot bot added the cla: yes label Aug 25, 2023
@@ -94,6 +94,14 @@ export namespace CoreTypes {
export const nowrap = 'nowrap';
}

export type TextOverflowType = 'clip' | 'ellipsis' | 'initial' | 'unset';
export namespace TextOverflow {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe an enum or even just a const variable would e better than a namespace

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just maintains the current consistency in core. Changing needs a more holistic core refactor.

@NathanWalker NathanWalker merged commit 8d25d25 into main Aug 27, 2023
3 checks passed
@NathanWalker NathanWalker deleted the feat/text-overflow-support branch August 27, 2023 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single-line, multi-line text overflow display ellipsis
2 participants