Skip to content

Commit aa8a0d7

Browse files
fix(accordion): move pressed state background to SCSS
1 parent 2c74f50 commit aa8a0d7

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

core/src/components/accordion/accordion.ionic.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
--padding-end: #{globals.$ion-space-400};
5757
--padding-bottom: #{globals.$ion-space-300};
5858
--padding-start: #{globals.$ion-space-400};
59+
--background-activated: #{globals.$ion-bg-neutral-subtlest-press};
5960

6061
@include globals.typography(globals.$ion-heading-h6-medium);
6162
}

core/src/components/accordion/accordion.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,6 @@ export class Accordion implements ComponentInterface {
206206
* for specific styling purposes
207207
*/
208208
ionItem.classList.add('accordion-header-item');
209-
210-
/**
211-
* Set the pressed state background color for ionic theme.
212-
* This overrides the default blue color from ion-item.
213-
*/
214-
const theme = getIonTheme(this);
215-
if (theme === 'ionic') {
216-
ionItem.style.setProperty('--background-activated', 'var(--token-bg-neutral-subtlest-press)');
217-
}
218209
};
219210

220211
private getSlottedHeaderIonItem = () => {

0 commit comments

Comments
 (0)