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

Fixes word break #172

Closed
wants to merge 3 commits into from
Closed

Fixes word break #172

wants to merge 3 commits into from

Conversation

michaelthorne
Copy link
Contributor

No description provided.

@michaelthorne michaelthorne changed the title Fix word break #171 Fixes word break Dec 18, 2014
@drublic
Copy link
Owner

drublic commented Dec 23, 2014

Yes, break-word is not in the spec.
For break-all it says:

In addition to ‘normal’ soft wrap opportunities, lines may break between any two letters (except where forbidden by the ‘line-break’ property). Hyphenation is not applied. This option is used mostly in a context where the text is predominantly using CJK characters with few non-CJK excerpts and it is desired that the text be better distributed on each line.

I don't think this is what we need here, right?

Please see the SO issue here: http:https://stackoverflow.com/questions/1795109/what-is-the-difference-between-word-break-break-all-versus-word-wrap-break

I'd opt for leaving it as is.

@drublic
Copy link
Owner

drublic commented Jan 4, 2015

Any more input? Otherwise I'll leave it as it is.

@michaelthorne
Copy link
Contributor Author

I'd rather go with what the current W3C spec says:

Property: word-break
Value(s): normal | keep-all | break-all

http:https://www.w3.org/TR/css3-text/#word-break

Property: overflow-wrap/word-wrap
Value(s): normal | break-word

http:https://www.w3.org/TR/css3-text/#overflow-wrap-property

This article "Word wrapping/hyphenation using CSS." from that Stack Overflow thread discusses it further.

@drublic
Copy link
Owner

drublic commented Jan 6, 2015

Ok, so you are right I think. We should implement both as the article suggests.

Could you please update to:

-ms-word-break: break-all; // Needed for oldIE support, but words are broken up letter-by-letter
     word-break: break-all;
     word-break: break-word; // Non standard for webkit

and please remember to update the changelog :)

Thanks so much!

@michaelthorne
Copy link
Contributor Author

@drublic Updated to include the non-standard word-break for WebKit, as well as the CHANGELOG.md and version in package.json.

But now there's a merge conflict due to the earlier commit.

@drublic drublic closed this in 4788b6d Jan 6, 2015
drublic pushed a commit that referenced this pull request Jan 6, 2015
@drublic
Copy link
Owner

drublic commented Jan 6, 2015

Thanks. I've changed your commits a bit and incorporated them into one.
Again, thanks for the update and the nice response times :)

@drublic drublic reopened this Jan 6, 2015
@drublic drublic closed this Jan 6, 2015
@michaelthorne
Copy link
Contributor Author

👍 Thanks!

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

2 participants