Skip to content

Commit 09eb85b

Browse files
committed
fix(Item): prevent default focus style when there is any selected option
1 parent b01c591 commit 09eb85b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

core/src/components/item/item.ionic.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
--background: #{globals.$ion-bg-surface-default};
99
--background-activated: #{globals.$ion-bg-select-default};
1010
--background-focused: #{globals.$ion-primitives-neutral-200};
11-
--background-focused-opacity: 1;
11+
--background-focused-opacity: 0;
1212
--border-color: #{globals.$ion-primitives-neutral-300};
1313
--border-style: #{globals.$ion-border-style-solid};
1414
--border-width: #{0 0 globals.$ion-border-size-025 0};

core/src/components/select-modal/select-modal.ionic.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,9 @@ ion-content {
6767
--padding-end: #{globals.$ion-space-400} !important;
6868
/* stylelint-disable-next-line declaration-no-important */
6969
--padding-bottom: #{globals.$ion-space-1200} !important;
70+
71+
// Set the background to the focused element within a radio group only when there is a checked radio
72+
&:has(.radio-checked) .ion-focused:not(.item-radio-checked) {
73+
--background-focused-opacity: 1;
74+
}
7075
}

0 commit comments

Comments
 (0)