Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit c4e9f9e

Browse files
Googlernshahan
authored andcommitted
Add material-tooltip-card-max-width mixin
PiperOrigin-RevId: 209458696
1 parent 3e03114 commit c4e9f9e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lib/material_tooltip/_mixins.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,20 @@
1919
}
2020
}
2121
}
22+
23+
/// Overrides the default maximum width of <material-tooltip-card>.
24+
/// Because this component uses a <material-popup>, Angular style encapsulation can prevent styles
25+
/// using this mixin from applying to the contents of the popup. To address this, use the
26+
/// `tooltipClass` attribute on the <material-tooltip-card> and then use that class around the
27+
/// reference to this mixin:
28+
///
29+
/// <material-tooltip-card tooltipClass="foo">
30+
///
31+
/// .foo {
32+
/// @include material-tooltip-card-max-width(...);
33+
/// }
34+
@mixin material-tooltip-card-max-width($max-width: 50 * $mat-grid) {
35+
::ng-deep .popup .material-popup-content .paper-container {
36+
max-width: $max-width;
37+
}
38+
}

0 commit comments

Comments
 (0)