Skip to content

feat(dropdown-item): enhance component's interactivity states #11821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ describe("calcite-dropdown-item", () => {
selector: "calcite-dropdown-item",
},
"--calcite-dropdown-item-text-color-press": [
{
targetProp: "color",
shadowSelector: `.${CSS.container}`,
selector: "calcite-dropdown-item",
state: "focus",
},
{
targetProp: "color",
shadowSelector: `.${CSS.container}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @prop --calcite-dropdown-item-background-color-hover: Specifies the item's background color when hovered.
* @prop --calcite-dropdown-item-background-color-press: Specifies the item's background color when selected or active.
* @prop --calcite-dropdown-item-icon-color-hover: Specifies the item's icon selection color when hovered.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid a breaking change, can we deprecate and remove at 4.0? The prop itself would be applied if set by developers, but we'd no longer have default styling for it. cc @ashetland

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the PR with --calcite-dropdown-item-icon-color-hover now being deprecated.

* @prop --calcite-dropdown-item-icon-color-hover: [Deprecated] Specifies the item's icon selection color when hovered.
* @prop --calcite-dropdown-item-icon-color-press: Specifies the item's icon selection color when selected or active.
* @prop --calcite-dropdown-item-text-color-press: Specifies the item's text when selected or active.
* @prop --calcite-dropdown-item-text-color: Specifies the item's text color.
Expand Down Expand Up @@ -101,8 +101,7 @@
//focus
:host(:focus) {
.container {
@apply focus-inset text-color-1 no-underline;
color: var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1));
@apply focus-inset no-underline;
}
}

Expand Down Expand Up @@ -139,8 +138,7 @@
}

:host(:hover:not([disabled])) .dropdown-item-icon {
color: var(--calcite-dropdown-item-icon-color-hover, var(--calcite-color-border-1));
@apply opacity-100;
color: var(--calcite-dropdown-item-icon-color-hover);
}

:host([selected]) .dropdown-item-icon {
Expand Down
Loading