Skip to content

Commit 34a663f

Browse files
authored
feat(dropdown-item): enhance component's interactivity states (#11821)
**Related Issue:** [#10019](#10019) ## Summary - Remove ghosted selection icon on hover and pressed. - Remove icon and text color changes when focused. deprecate(dropdown-item): remove `--calcite-dropdown-item-icon-color-hover` css token.
1 parent 33312d5 commit 34a663f

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

Diff for: packages/calcite-components/src/components/dropdown-item/dropdown-item.e2e.ts

-6
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ describe("calcite-dropdown-item", () => {
8080
selector: "calcite-dropdown-item",
8181
},
8282
"--calcite-dropdown-item-text-color-press": [
83-
{
84-
targetProp: "color",
85-
shadowSelector: `.${CSS.container}`,
86-
selector: "calcite-dropdown-item",
87-
state: "focus",
88-
},
8983
{
9084
targetProp: "color",
9185
shadowSelector: `.${CSS.container}`,

Diff for: packages/calcite-components/src/components/dropdown-item/dropdown-item.scss

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @prop --calcite-dropdown-item-background-color-hover: Specifies the item's background color when hovered.
77
* @prop --calcite-dropdown-item-background-color-press: Specifies the item's background color when selected or active.
8-
* @prop --calcite-dropdown-item-icon-color-hover: Specifies the item's icon selection color when hovered.
8+
* @prop --calcite-dropdown-item-icon-color-hover: [Deprecated] Specifies the item's icon selection color when hovered.
99
* @prop --calcite-dropdown-item-icon-color-press: Specifies the item's icon selection color when selected or active.
1010
* @prop --calcite-dropdown-item-text-color-press: Specifies the item's text when selected or active.
1111
* @prop --calcite-dropdown-item-text-color: Specifies the item's text color.
@@ -101,8 +101,7 @@
101101
//focus
102102
:host(:focus) {
103103
.container {
104-
@apply focus-inset text-color-1 no-underline;
105-
color: var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1));
104+
@apply focus-inset no-underline;
106105
}
107106
}
108107

@@ -139,8 +138,7 @@
139138
}
140139

141140
:host(:hover:not([disabled])) .dropdown-item-icon {
142-
color: var(--calcite-dropdown-item-icon-color-hover, var(--calcite-color-border-1));
143-
@apply opacity-100;
141+
color: var(--calcite-dropdown-item-icon-color-hover);
144142
}
145143

146144
:host([selected]) .dropdown-item-icon {

0 commit comments

Comments
 (0)