Skip to content

Commit

Permalink
fix(combo-box): update the focus and hover chevron icon color (#9187)
Browse files Browse the repository at this point in the history
**Related Issue:**
[#7711](#7711)

### Summary
This updates `combo-box` chevron colors to be `--calcite-color-text-3`
when idle and `--calcite-color-text-1` when hovered or pressed.
  • Loading branch information
aPreciado88 committed Apr 24, 2024
1 parent 710d1ee commit a1317da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/calcite-components/src/components/combobox/combobox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
border-solid;
padding-block: calc(var(--calcite-combobox-item-spacing-unit-s) / 4);
padding-inline: var(--calcite-combobox-item-spacing-unit-l);

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

:host(:focus-within) .wrapper,
Expand Down Expand Up @@ -178,6 +186,10 @@

.icon-end {
@apply flex-none;

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

.floating-ui-container {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,7 @@ export class Combobox
return (
<span class="icon-end" key="chevron">
<calcite-icon
class={CSS.icon}
icon={open ? "chevron-up" : "chevron-down"}
scale={getIconScale(this.scale)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export const CSS = {
selectionDisplayFit: "selection-display-fit",
selectionDisplaySingle: "selection-display-single",
listContainer: "list-container",
icon: "icon",
};

0 comments on commit a1317da

Please sign in to comment.