From f8a11af1d97c94d9f12e6130dcc66685c4e595d4 Mon Sep 17 00:00:00 2001 From: Tom Shen Date: Mon, 23 Aug 2021 20:37:42 -0400 Subject: [PATCH] [core,popover2] Fix heading colors in tooltips in dark mode (#4832) Co-authored-by: Adi Dahiya --- packages/core/src/components/popover/_common.scss | 7 +++++++ packages/popover2/src/_common.scss | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/packages/core/src/components/popover/_common.scss b/packages/core/src/components/popover/_common.scss index 495a87a078..45fb166776 100644 --- a/packages/core/src/components/popover/_common.scss +++ b/packages/core/src/components/popover/_common.scss @@ -139,6 +139,13 @@ $dark-popover-background-color: $dark-gray4 !default; .#{$ns}-popover-content { background: $background-color; + } + + // Some popovers (like tooltips) invert their foreground/background colors relative + // to what we expect for the theme. In those cases, we need to override global typography + // styles to get the right colors. + .#{$ns}-popover-content, + .#{$ns}-heading { color: $text-color; } diff --git a/packages/popover2/src/_common.scss b/packages/popover2/src/_common.scss index d12d319b0b..d5fe7efff4 100644 --- a/packages/popover2/src/_common.scss +++ b/packages/popover2/src/_common.scss @@ -56,6 +56,13 @@ $pt-dark-tooltip2-box-shadow: $pt-dark-popover-box-shadow !default; .#{$ns}-popover2-content { background: $background-color; + } + + // Some popovers (like tooltips) invert their foreground/background colors relative + // to what we expect for the theme. In those cases, we need to override global typography + // styles to get the right colors. + .#{$ns}-popover2-content, + .#{$ns}-heading { color: $text-color; }