From 590050f92c5f697a4f94b1db602f55859fde920d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCller?= Date: Thu, 4 Apr 2024 18:50:01 +0200 Subject: [PATCH] fix(switch): add text color for switch toggle The switch toggle itself already has a background color, which means that the IO label on top of it should be independent of the surrounding --color-label to ensure proper contrast when the toggle background and the label background differ significantly. --- packages/components/src/components/switch/switch.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/components/src/components/switch/switch.css b/packages/components/src/components/switch/switch.css index ba3562eae8..7e77e7e137 100644 --- a/packages/components/src/components/switch/switch.css +++ b/packages/components/src/components/switch/switch.css @@ -26,6 +26,7 @@ scale-switch { .switch { --_background: var(--telekom-color-ui-faint); + --_on-background: var(--telekom-color-text-and-icon-standard); --_color-thumb: var(--telekom-color-ui-white, #fff); --_overlay-background: transparent; @@ -55,6 +56,7 @@ scale-switch { width: var(--width); height: var(--height); background: var(--_background); + color: var(--_on-background); border-radius: var(--radius); transition-property: background; transition-duration: var(--transition-duration);