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 3333$background-color : rgba (black , theme-color .text-emphasis (medium ));
3434$border-radius : small ;
3535$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+
3641// Use a custom property so IE11 does not use "normal" and instead uses provided
3742// fall-back value.
3843$word-break-custom-prop : custom-properties .create (
@@ -96,6 +101,17 @@ $z-index: 2;
96101 }
97102}
98103
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+
99115// Sets the fill/surface color of the tooltip.
100116// @param {Color | String} $color
101117@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;
8787
8888 & .mdc-tooltip--rich {
8989 @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+ );
9098 @include feature-targeting .targets ($feat-structure ) {
9199 display : inline-block ;
92100 border-radius : $_rich_corner_radius ;
You can’t perform that action at this time.
0 commit comments