Skip to content

Commit

Permalink
fix(material/tooltip): body line height affecting gap (#30164)
Browse files Browse the repository at this point in the history
Fixes that the line height of the `body` element was affecting the gap between the tooltip and the trigger.

Fixes #30132.
  • Loading branch information
crisbeto authored Dec 12, 2024
1 parent c12b73e commit c04f84f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/material/tooltip/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,14 @@
}
}

// We need the additional specificity here, because it can be overridden by `.cdk-overlay-panel`.
.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive {
pointer-events: none;
.mat-mdc-tooltip-panel {
// The line height inherited from the body can throw off the tooltip gap (see #30132).
line-height: normal;

// We need the additional specificity here, because it can be overridden by `.cdk-overlay-panel`.
&.mat-mdc-tooltip-panel-non-interactive {
pointer-events: none;
}
}

@keyframes mat-mdc-tooltip-show {
Expand Down

0 comments on commit c04f84f

Please sign in to comment.