Skip to content

Commit

Permalink
fix(select): update the focus and hover chevron icon color and select…
Browse files Browse the repository at this point in the history
… focus and hover background color (#9160)

**Related Issue:**
[7714](#7714)

### Summary 
This updates `select` chevron colors to be `--calcite-color-text-3` when
idle and `--calcite-color-text-1` when hovered or pressed.
This also updates `select` background color to `bg-foreground-1` when
hovered or pressed.
  • Loading branch information
aPreciado88 committed Apr 24, 2024
1 parent b7f096b commit b187340
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/calcite-components/src/components/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
.wrapper {
@apply relative flex items-stretch;
inline-size: var(--select-width);

&:focus-within,
&:active,
&:hover {
.icon {
color: var(--calcite-color-text-1);
}
}
}

@include disabled();
Expand Down Expand Up @@ -79,10 +87,6 @@
&:focus {
@apply focus-inset;
}

&:hover {
@apply bg-foreground-2;
}
}

// override user agent stylesheet disabled styling
Expand All @@ -94,6 +98,10 @@ select:disabled {
@apply border-color-input text-color-2 pointer-events-none absolute inset-y-0 flex items-center border-0 border-solid bg-transparent;
inset-inline-end: theme("inset.0");
border-inline-width: theme("borderWidth.0") theme("borderWidth.DEFAULT");

.icon {
color: var(--calcite-color-text-3);
}
}

:host([status="invalid"]) {
Expand Down

0 comments on commit b187340

Please sign in to comment.