Skip to content

[docs] Updates to Text LineClamp #511

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

Merged
merged 2 commits into from
Mar 17, 2025
Merged

Conversation

DaveL17
Copy link
Contributor

@DaveL17 DaveL17 commented Mar 12, 2025

This is a simple revision that adds to the lineClamp attribute of the <Text> element. The attribute can be set to a value of zero which will display all text. This is a useful option for users that may want to toggle the value.

For Example:

<script>
let lineClamp = 1;
</script>

<Text lineClamp={lineClamp} on:click={() => lineClamp = lineClamp === 1 ? 0 : 1}>
  My text goes here...
</Text>

It makes two simple changes:

  • adds a short description to the elements' documentation, and
  • modifies the demo range to allow for the value of 0.

Associated issue: #510

DaveL17 added 2 commits March 12, 2025 06:48
Adds clarity for lineClamp
Extends lineClamp value to include 0.
@BeeMargarida
Copy link
Member

Hey, thank you for this PR!

@BeeMargarida BeeMargarida merged commit 1538d71 into svelteuidev:main Mar 17, 2025
1 check passed
@DaveL17
Copy link
Contributor Author

DaveL17 commented Mar 17, 2025

My pleasure. Thanks for SvelteUI!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants