diff --git a/core/api.txt b/core/api.txt index aace736a73..c2928a8988 100644 --- a/core/api.txt +++ b/core/api.txt @@ -985,6 +985,7 @@ ion-item,prop,type,"button" | "reset" | "submit",'button',false,false ion-item,css-prop,--background,ionic ion-item,css-prop,--background,ios ion-item,css-prop,--background,md +ion-item,css-prop,--background-activated,ionic ion-item,css-prop,--background-activated,ios ion-item,css-prop,--background-activated,md ion-item,css-prop,--background-activated-opacity,ios diff --git a/core/src/components/item/item.ionic.scss b/core/src/components/item/item.ionic.scss index 4a42946c41..711005b230 100644 --- a/core/src/components/item/item.ionic.scss +++ b/core/src/components/item/item.ionic.scss @@ -6,6 +6,7 @@ :host { /** * @prop --background: Background of the item + * @prop --background-activated: Background of the item when pressed. Note: setting this will interfere with the Material Design ripple. * * @prop --border-color: Color of the item border * @prop --border-style: Style of the item border @@ -20,6 +21,7 @@ * */ --background: #{globals.$ionic-color-base-white}; + --background-activated: #{globals.$ionic-color-neutral-200}; --border-color: #{globals.$ionic-color-neutral-300}; --border-style: #{globals.$ionic-border-style-solid}; --border-width: #{globals.$ionic-border-size-025}; @@ -88,3 +90,10 @@ box-sizing: border-box; } } + +// Item: Activated +// -------------------------------------------------- + +:host(.ion-activated) .item-native { + background: var(--background-activated); +} diff --git a/core/src/components/item/test/theme-ionic/index.html b/core/src/components/item/test/theme-ionic/index.html index c5bb1d0a3b..e77375bcd3 100644 --- a/core/src/components/item/test/theme-ionic/index.html +++ b/core/src/components/item/test/theme-ionic/index.html @@ -158,6 +158,16 @@ Outline + + Item activatable + + + Start + +

Heading

+

Normal paragraph

+
+