From 01f659ae9812363c40a4f79511f26b564dd550a2 Mon Sep 17 00:00:00 2001 From: leagrdv Date: Mon, 25 Nov 2024 16:42:07 +0100 Subject: [PATCH] fix(components): card-control display on light bg --- .changeset/sharp-cars-trade.md | 5 +++++ .../src/components/post-card-control/post-card-control.scss | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/sharp-cars-trade.md diff --git a/.changeset/sharp-cars-trade.md b/.changeset/sharp-cars-trade.md new file mode 100644 index 0000000000..9f64ad53e1 --- /dev/null +++ b/.changeset/sharp-cars-trade.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Fixed display of `card-control` web component on light backgrounds. diff --git a/packages/components/src/components/post-card-control/post-card-control.scss b/packages/components/src/components/post-card-control/post-card-control.scss index 9633f47f09..7a24038fd1 100644 --- a/packages/components/src/components/post-card-control/post-card-control.scss +++ b/packages/components/src/components/post-card-control/post-card-control.scss @@ -9,7 +9,6 @@ */ :host { - // remove as soon as all browser support :host-context() // https://caniuse.com/?search=%3Ahost-context() --post-card-control-bg-context: #{post.$backgrounds}; @@ -308,7 +307,7 @@ } } - :host-context(:is(#{post.$dark-backgrounds})) & { + :host-context(:is(#{post.$dark-backgrounds})) *:not(:is(#{post.$light-backgrounds})) & { --post-card-control-border-color: #{post.$white}; --post-card-control-bg: transparent; --post-card-control-color: #{post.$white};