Skip to content

Commit c04f84f

Browse files
authored
fix(material/tooltip): body line height affecting gap (#30164)
Fixes that the line height of the `body` element was affecting the gap between the tooltip and the trigger. Fixes #30132.
1 parent c12b73e commit c04f84f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/material/tooltip/tooltip.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,14 @@
9898
}
9999
}
100100

101-
// We need the additional specificity here, because it can be overridden by `.cdk-overlay-panel`.
102-
.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive {
103-
pointer-events: none;
101+
.mat-mdc-tooltip-panel {
102+
// The line height inherited from the body can throw off the tooltip gap (see #30132).
103+
line-height: normal;
104+
105+
// We need the additional specificity here, because it can be overridden by `.cdk-overlay-panel`.
106+
&.mat-mdc-tooltip-panel-non-interactive {
107+
pointer-events: none;
108+
}
104109
}
105110

106111
@keyframes mat-mdc-tooltip-show {

0 commit comments

Comments
 (0)