This repository was archived by the owner on Jan 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 33
33
$background-color : rgba (black , theme-color .text-emphasis (medium ));
34
34
$border-radius : small ;
35
35
$label-color : text- primary- on- dark;
36
+
37
+ // Rich Tooltip variables
38
+ $rich-background-color : rgba (white , theme-color .text-emphasis (medium ));
39
+ $rich-text-color : text- primary- on- light;
40
+
36
41
// Use a custom property so IE11 does not use "normal" and instead uses provided
37
42
// fall-back value.
38
43
$word-break-custom-prop : custom-properties .create (
@@ -96,6 +101,17 @@ $z-index: 2;
96
101
}
97
102
}
98
103
104
+ // Sets the color of the rich tooltip text.
105
+ // @param {Color | String} $color
106
+ @mixin rich-text-ink-color ($color , $query : feature-targeting .all ()) {
107
+ $feat-color : feature-targeting .create-target ($query , color );
108
+ @include feature-targeting .targets ($feat-color ) {
109
+ .mdc-tooltip__surface {
110
+ @include theme .prop (color , $color );
111
+ }
112
+ }
113
+ }
114
+
99
115
// Sets the fill/surface color of the tooltip.
100
116
// @param {Color | String} $color
101
117
@mixin fill-color ($color , $query : feature-targeting .all ()) {
Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ $exit-duration: 75ms;
87
87
88
88
& .mdc-tooltip--rich {
89
89
@include elevation-mixins .elevation (2 , $query : $query );
90
+ @include tooltip-theme .fill-color (
91
+ tooltip-theme .$rich-background-color ,
92
+ $query : $query
93
+ );
94
+ @include tooltip-theme .rich-text-ink-color (
95
+ tooltip-theme .$rich-text-color ,
96
+ $query : $query
97
+ );
90
98
@include feature-targeting .targets ($feat-structure ) {
91
99
display : inline-block ;
92
100
border-radius : $_rich_corner_radius ;
You can’t perform that action at this time.
0 commit comments