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

Prevent long words from overflowing #147

Merged
merged 1 commit into from Jul 28, 2016
Merged

Prevent long words from overflowing #147

merged 1 commit into from Jul 28, 2016

Conversation

shadowhand
Copy link
Contributor

@shadowhand shadowhand commented Jul 27, 2016

Ran into this issue with user-generated text that overflowed the tooltip.

Before:

screenshot 2016-07-27 09 53 20

After:

screenshot 2016-07-27 09 53 06

@@ -67,6 +67,7 @@
font-family: $hintFontFamily;
line-height: $hintFontSize; // Vertical centering.
white-space: nowrap; // Prevent breaking to new line.
word-wrap: break-word; // Ensure long words do not overflow.
Copy link
Owner

@chinchang chinchang Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose you are using one of the width limiting classes in your screenshot? In that case, word-wrap property should only be applied for those 3 classes because otherwise it won't make any sense as words won't break at all.

Copy link
Contributor Author

@shadowhand shadowhand Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, we are using hint--medium. I will update the PR.

@@ -18,6 +18,7 @@
&:after {
white-space: normal;
line-height: 1.4em;
word-wrap: break-word; // Ensure long words do not overflow.
Copy link
Contributor Author

@shadowhand shadowhand Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chinchang applied to correct file.

Copy link
Owner

@chinchang chinchang Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I'll get this ready for release. Thanks for the patch.

@chinchang chinchang merged commit 3d11dd0 into chinchang:master Jul 28, 2016
@chinchang
Copy link
Owner

chinchang commented Jul 28, 2016

this is live in 2.3.2. Thanks @shadowhand 👍

@shadowhand shadowhand deleted the patch-1 branch Jul 28, 2016
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