Skip to content

Commit 42f16cf

Browse files
committed
fix(select): use correct focus class for styling
1 parent 4317da0 commit 42f16cf

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

core/src/components/select/select.md.outline.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* If the select has a validity state, the
2323
* border should reflect that as a color.
2424
*/
25-
:host(.has-focus.select-fill-outline.ion-valid),
25+
:host(.ion-focused.select-fill-outline.ion-valid),
2626
:host(.select-fill-outline.ion-touched.ion-invalid) {
2727
--border-color: var(--highlight-color);
2828
}

core/src/components/select/select.md.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
color: var(--highlight-color);
3636
}
3737

38-
:host(.has-focus.select-label-placement-floating.ion-valid) .label-text-wrapper,
38+
:host(.ion-focused.select-label-placement-floating.ion-valid) .label-text-wrapper,
3939
:host(.select-label-placement-floating.ion-touched.ion-invalid) .label-text-wrapper,
40-
:host(.has-focus.select-label-placement-stacked.ion-valid) .label-text-wrapper,
40+
:host(.ion-focused.select-label-placement-stacked.ion-valid) .label-text-wrapper,
4141
:host(.select-label-placement-stacked.ion-touched.ion-invalid) .label-text-wrapper {
4242
color: var(--highlight-color);
4343
}
@@ -93,7 +93,7 @@
9393
* color if there is a validation state.
9494
*/
9595
:host(.select-expanded) .select-wrapper .select-icon,
96-
:host(.has-focus.ion-valid) .select-wrapper .select-icon,
96+
:host(.ion-focused.ion-valid) .select-wrapper .select-icon,
9797
:host(.ion-touched.ion-invalid) .select-wrapper .select-icon,
9898
:host(.ion-focused) .select-wrapper .select-icon {
9999
color: var(--highlight-color);

core/src/components/select/select.md.solid.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* If the select has a validity state, the
2828
* border should reflect that as a color.
2929
*/
30-
:host(.has-focus.select-fill-solid.ion-valid),
30+
:host(.ion-focused.select-fill-solid.ion-valid),
3131
:host(.select-fill-solid.ion-touched.ion-invalid) {
3232
--border-color: var(--highlight-color);
3333
}

core/src/components/select/select.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ button {
265265
* The component highlight is only shown
266266
* on focus, so we can safely set the valid
267267
* color state when touched/valid. If we
268-
* set it when .has-focus is present then
268+
* set it when .ion-focused is present then
269269
* the highlight color would change
270270
* from the valid color to the component's
271271
* color during the transition after the
@@ -307,7 +307,7 @@ button {
307307
* is currently focused. Do not show the valid
308308
* highlight when the select is blurred.
309309
*/
310-
:host(.has-focus.ion-valid),
310+
:host(.ion-focused.ion-valid),
311311
:host(.ion-touched.ion-invalid) {
312312
--border-color: var(--highlight-color);
313313
}

core/src/components/select/test/a11y/select.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ configs({ directions: ['ltr'], palettes: ['light', 'dark'] }).forEach(({ title,
6565
await page.setContent(
6666
`
6767
<main>
68-
<ion-select class="has-focus" label="Label" value="a">
68+
<ion-select class="ion-focused" label="Label" value="a">
6969
<ion-select-option value="a">Apple</ion-select-option>
7070
</ion-select>
71-
<ion-select class="has-focus" label-placement="floating" label="Label" value="a">
71+
<ion-select class="ion-focused" label-placement="floating" label="Label" value="a">
7272
<ion-select-option value="a">Apple</ion-select-option>
7373
</ion-select>
74-
<ion-select class="has-focus" fill="outline" label-placement="floating" label="Label" value="a">
74+
<ion-select class="ion-focused" fill="outline" label-placement="floating" label="Label" value="a">
7575
<ion-select-option value="a">Apple</ion-select-option>
7676
</ion-select>
7777
</main>

0 commit comments

Comments
 (0)