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

Add 'wordBreak' option to prevent cutting words #27

Closed

Conversation

alejandroiglesias
Copy link

@alejandroiglesias alejandroiglesias commented Feb 4, 2019

Ideally, this would be set as an attribute so that it can be controlled on a per-instance basis, but it exceeds what I can do now and this seems good enough for now.

@AndyDyer
Copy link

AndyDyer commented Feb 27, 2019

I agree with the idea, but why not just add the ability to pass in what word-wrap you want
options = {...options, textOverflow: 'ellipsis', wordBreak: 'normal'};
word-break: ${options.wordBreak};

#28
@alejandroiglesias

@alejandroiglesias
Copy link
Author

@AndyDyer I'm okay with whatever method allows me to achieve word-break: break-word.

@Frondor
Copy link
Owner

Frondor commented Mar 24, 2019

Thanks both for your contributions!

At the moment we are not setting any word-break by default... What stops you from selecting the element and applying the css yourself? I don't believe word-break goes with the line-break idea, neither its vue-line-clamp responsibility to set it.

@AndyDyer
Copy link

@Frondor Totally could set it by ourselves, but the fact you are setting word-break to its non default value leads me to believe that their is an inherent link between word-break and line-break.

In fact the use case that made me do this was that I needed word-break to be its default value and was surprised that you were changing it

@alejandroiglesias
Copy link
Author

@Frondor vue-line-clamp does set word-break.

@franciscolourenco
Copy link

Why is word-break: break-all on by default?

@Frondor
Copy link
Owner

Frondor commented Apr 1, 2019

For some reason I missed that line, and we are indeed setting word-break to a hardcoded default.

I'm closing this in favor of #28 for an extended config.
Thank you both, and sorry for the delay.

@Frondor Frondor closed this Apr 1, 2019
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.

None yet

4 participants