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

wrong width of span on load #148

Open
yesh opened this issue Jul 24, 2021 · 2 comments
Open

wrong width of span on load #148

yesh opened this issue Jul 24, 2021 · 2 comments

Comments

@yesh
Copy link

yesh commented Jul 24, 2021

Hi,
I don't know if I am implementing the component in a wrong way or if it is a bug.

I'm trying to truncate plain text in a gatsby project:

the code is

<div>
  <Truncate lines={3}>
    {text}
  </Truncate>
</div>

where the input text is:

Retro vegan hammock, street art listicle pop-up tilde organic trust fund authentic. Affogato af franzen aesthetic selvage cred. Hashtag la croix vape heirloom umami kinfolk. Before they sold out lyft crucifix venmo. Flannel tacos beard selfies master cleanse, +1 plaid gastropub. Fashion axe mumblecore ennui four loko, snackwave kitsch hell of leggings. Actually thundercats blog +1 echo park dreamcatcher occupy slow-carb 3 wolf moon hell of seitan subway tile sustainable flannel coloring book.

and on page load the result looks like this:

Screenshot 2021-07-23 at 12 24 06

then if I resize the browser window the text resizes correctly like this:

Screenshot 2021-07-23 at 12 24 13

am I missing something in the settings or is it a bug?

thank you.

@pguduguntla
Copy link

@yesh were you able to fix this?

@yesh
Copy link
Author

yesh commented Aug 21, 2023

@yesh were you able to fix this?

unfortunately not.

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

No branches or pull requests

2 participants