Skip to content

Commit

Permalink
fix(material/tooltip): increase specificity of non-interactive styles (
Browse files Browse the repository at this point in the history
…#28180)

Fixes that the specificity of the `mat-mdc-tooltip-panel-non-interactive` class was too low which meant that it was easy to override by other structural styles.

Fixes #28145.

(cherry picked from commit 96fe7b3)
  • Loading branch information
crisbeto committed Nov 23, 2023
1 parent 86c55d0 commit c2a8129
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/material/tooltip/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@use '../core/tokens/m2/mdc/plain-tooltip' as m2-mdc-plain-tooltip;

@include mdc-custom-properties.configure($emit-fallback-values: false,
$emit-fallback-vars: false) {
$emit-fallback-vars: false) {
$mdc-tooltip-token-slots: m2-mdc-plain-tooltip.get-token-slots();

// Add the MDC tooltip static styles.
Expand Down Expand Up @@ -59,7 +59,8 @@ $emit-fallback-vars: false) {
}
}

.mat-mdc-tooltip-panel-non-interactive {
// 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;
}

Expand Down

0 comments on commit c2a8129

Please sign in to comment.