From 3dc6fbd42712afe193b192c2d189b279bba9a158 Mon Sep 17 00:00:00 2001 From: Xc <124118265@qq.com> Date: Thu, 25 Aug 2022 09:19:33 +0800 Subject: [PATCH] fix(components): [opover] effect dark mode title color (#9445) --- docs/en-US/component/popover.md | 2 +- packages/theme-chalk/src/popover.scss | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/en-US/component/popover.md b/docs/en-US/component/popover.md index c148b36794..fa88b7221c 100644 --- a/docs/en-US/component/popover.md +++ b/docs/en-US/component/popover.md @@ -68,7 +68,7 @@ popover/directive-usage | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | | trigger | how the popover is triggered | string | click/focus/hover/contextmenu | click | | title | popover title | string | — | — | -| effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | dark | +| effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | light | | content | popover content, can be replaced with a default `slot` | string | — | — | | width | popover width | string / number | — | Min width 150px | | placement | popover placement | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom | diff --git a/packages/theme-chalk/src/popover.scss b/packages/theme-chalk/src/popover.scss index 178c0cfad9..b3dc0b53ff 100644 --- a/packages/theme-chalk/src/popover.scss +++ b/packages/theme-chalk/src/popover.scss @@ -38,6 +38,13 @@ } } + @include when(dark) { + @include set-css-var-value( + 'popover-title-text-color', + var(#{getCssVarName('bg-color')}) + ); + } + &:focus:active, &:focus { outline-width: 0;