diff --git a/core/src/components/item/item.ios.scss b/core/src/components/item/item.ios.scss index eae9433a1a..c86f63f832 100644 --- a/core/src/components/item/item.ios.scss +++ b/core/src/components/item/item.ios.scss @@ -11,8 +11,18 @@ --inner-padding-end: #{$item-ios-padding-end}; --inner-border-width: #{0px 0px $item-ios-border-bottom-width 0px}; --background: #{$item-ios-background}; - --background-activated: #000; - --background-focused: #000; + /** + * The active/focus states need + * to be the opposite of the background color + * so there is enough contrast. The background + * defaults to var(--ion-background-color), so we + * default to var(--ion-text-color) which will give us + * the opposite color. + * i.e. if var(--ion-background-color) is #000 + * then var(--ion-text-color) will be #fff. + */ + --background-activated: #{$text-color}; + --background-focused: #{$text-color}; --background-hover: currentColor; --background-activated-opacity: .12; --background-focused-opacity: .15; diff --git a/core/src/components/item/test/buttons/index.html b/core/src/components/item/test/buttons/index.html index fb8d5449ca..d28eafee33 100644 --- a/core/src/components/item/test/buttons/index.html +++ b/core/src/components/item/test/buttons/index.html @@ -12,6 +12,165 @@ + +
@@ -188,6 +347,12 @@