Skip to content

Commit fb5e1d4

Browse files
crisbetommalerba
authored andcommitted
fix(tooltip): provide a maximum width (#2678)
Adds a `max-width` to the tooltip, in order to wrap longer lines of text. Note that the value is arbitrary since there was nothing about it in the spec. Fixes #2671.
1 parent 4f59ad0 commit fb5e1d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/tooltip/tooltip.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55
$md-tooltip-target-height: 22px;
6+
$md-tooltip-max-width: 250px;
67
$md-tooltip-font-size: 10px;
78
$md-tooltip-margin: 14px;
89
$md-tooltip-horizontal-padding: 8px;
@@ -19,6 +20,7 @@ $md-tooltip-vertical-padding: ($md-tooltip-target-height - $md-tooltip-font-size
1920
font-family: $md-font-family;
2021
font-size: $md-tooltip-font-size;
2122
margin: $md-tooltip-margin;
23+
max-width: $md-tooltip-max-width;
2224

2325
@include cdk-high-contrast {
2426
outline: solid 1px;

0 commit comments

Comments
 (0)