Skip to content

Commit

Permalink
Merge pull request #18927 from twbs/fix-16871
Browse files Browse the repository at this point in the history
Apply word-wrap:break-word to Tooltips and Popovers
  • Loading branch information
mdo committed Jan 24, 2016
2 parents a26b4bb + 032adf1 commit 2fe6c6c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions scss/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// So reset our font and text properties to avoid inheriting weird values.
@include reset-text();
font-size: $font-size-sm;
// Allow breaking very long words so they don't overflow the popover's bounds
word-wrap: break-word;
background-color: $popover-bg;
background-clip: padding-box;
border: $popover-border-width solid $popover-border-color;
Expand Down
2 changes: 2 additions & 0 deletions scss/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// So reset our font and text properties to avoid inheriting weird values.
@include reset-text();
font-size: $font-size-sm;
// Allow breaking very long words so they don't overflow the tooltip's bounds
word-wrap: break-word;
opacity: 0;

&.in { opacity: $tooltip-opacity; }
Expand Down
3 changes: 1 addition & 2 deletions scss/mixins/_reset-text.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@mixin reset-text {
font-family: $font-family-base;
// We deliberately do NOT reset font-size.
// We deliberately do NOT reset font-size or word-wrap.
font-style: normal;
font-weight: normal;
letter-spacing: normal;
Expand All @@ -14,5 +14,4 @@
white-space: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
}

0 comments on commit 2fe6c6c

Please sign in to comment.