vue-line-clamp
vue-line-clamp copied to clipboard
wordBreak Option, cleaned up logic on what function to use
…wordBreak option and cleaned up fallBackFunc logic
Is there any intention of merging either this or #27?
@alejandroiglesias I'd like to but I don't have write access
When I made this develop was out of date so I didn't know what the protocol was
I'm fine with this. Will test it locally tomorrow.
Can you add it to the readme, please?
Does it make sense to have wordBreak: 'break-all'
on by default when it is not the browser default? It prevents proper break of phrases which would fit in. What does it accomplish?
Because the ellipsis approach works better with break-all
. The symbol is supposed to be at the very limit of the container, not floating to the last word that fits in.
https://stackoverflow.com/questions/1795109/what-is-the-difference-between-word-break-break-all-versus-word-wrap-break
done @Frondor
@Frondor Can you provide an example of what you mean? When I set word-break: break-word
the ellipsis seems to work exactly the same way. It still breaks works and takes advantage of all the space in the second line:
break-all
break-word
Not that I disagree @franciscolourenco but making this change to default behavior is a breaking change, and this PR would allow people to choose their path.
@AndyDyer That is great. You could classify this a bug, since it is not documented or expected that this plugin changes the way the words break. In that case making the default break-word would be fixing it. Otherwise the major version can be incremented.
Up to @Frondor
@Frondor any more changes?
+1 on this please, we need it.
@Frondor bump
This is great, I could really use this as I was wondering why my word-break
value wasn't being honored and it turns out that this directive hardcodes the break-all
value as an inline style. I would love to be able to customize this.
@Frondor any blockers on merging this in?
@Frondor anything holding this up? If you need help just say it
Bump
Hello, i am also interested by this one, is there any chance this PR could go through? :)
+1 on getting this PR approved and released
Nice. Note that the default word-break: break-word;
is deprecated according to the MDN.
[
break-word
has] the same effect asword-break: normal
andoverflow-wrap: anywhere
, regardless of the actual value of theoverflow-wrap
property.
Maybe using word-break: normal;
as the default and adding an overflow-wrap
would be preferable?
@Frondor Can this be merged please? This is a crucial feature to present readable text.
@Frondor When this fix will be merged? The only option to use this lib now is to fork it and fix the issue locally 😔