From ef78a123e553e27d9c41c2735bf44c21cbfa7ade Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 26 Sep 2022 08:38:12 -0500 Subject: [PATCH] fix(chip): default color has contrast on dark mode (#25998) resolves #25997 --- core/src/components/chip/chip.ios.scss | 1 - core/src/components/chip/chip.md.scss | 1 - core/src/components/chip/chip.scss | 8 ++++---- core/src/components/chip/chip.tsx | 5 +---- 4 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 core/src/components/chip/chip.ios.scss delete mode 100644 core/src/components/chip/chip.md.scss diff --git a/core/src/components/chip/chip.ios.scss b/core/src/components/chip/chip.ios.scss deleted file mode 100644 index b2189a0bab..0000000000 --- a/core/src/components/chip/chip.ios.scss +++ /dev/null @@ -1 +0,0 @@ -@import "./chip"; diff --git a/core/src/components/chip/chip.md.scss b/core/src/components/chip/chip.md.scss deleted file mode 100644 index b2189a0bab..0000000000 --- a/core/src/components/chip/chip.md.scss +++ /dev/null @@ -1 +0,0 @@ -@import "./chip"; diff --git a/core/src/components/chip/chip.scss b/core/src/components/chip/chip.scss index 322c211a96..026b059e3b 100644 --- a/core/src/components/chip/chip.scss +++ b/core/src/components/chip/chip.scss @@ -69,7 +69,7 @@ } :host(.chip-outline) { - border-color: rgba(0, 0, 0, .32); + border-color: rgba($text-color-rgb, .32); background: transparent; } @@ -79,11 +79,11 @@ } :host(.chip-outline:not(.ion-color):focus) { - background: rgba(0, 0, 0, .04); + background: rgba($text-color-rgb, .04); } :host(.chip-outline.ion-activated:not(.ion-color)) { - background: rgba(0, 0, 0, .08); + background: rgba($text-color-rgb, .08); } @@ -95,7 +95,7 @@ } :host(:not(.ion-color)) ::slotted(ion-icon) { - color: rgba(0, 0, 0, .54); + color: rgba($text-color-rgb, .54); } ::slotted(ion-icon:first-child) { diff --git a/core/src/components/chip/chip.tsx b/core/src/components/chip/chip.tsx index 0d04a53482..51100a992f 100644 --- a/core/src/components/chip/chip.tsx +++ b/core/src/components/chip/chip.tsx @@ -10,10 +10,7 @@ import { createColorClasses } from '../../utils/theme'; */ @Component({ tag: 'ion-chip', - styleUrls: { - ios: 'chip.ios.scss', - md: 'chip.md.scss', - }, + styleUrl: 'chip.scss', shadow: true, }) export class Chip implements ComponentInterface {