Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
UI: Preserve popup colors for headings and disabled links
  • Loading branch information
ciampo committed Oct 23, 2026
commit 567e232d18a88543cb6d4c6d8c311e6d33709254
35 changes: 18 additions & 17 deletions packages/ui/src/menu/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@
grid-template-columns: subgrid;
}

&[data-popup-open]:not([data-disabled]),
&[data-highlighted]:not([data-disabled]) {
/* Link items expose aria-disabled without a data-disabled state. */
&[data-popup-open]:not([data-disabled], [aria-disabled="true"]),
&[data-highlighted]:not([data-disabled], [aria-disabled="true"]) {
--_gcd-a-color: var(--wpds-color-foreground-interactive-brand-strong-active);

background-color: var(--wpds-color-background-interactive-brand-strong-active);
Expand All @@ -192,7 +193,7 @@
}
}

&[data-disabled] {
&:is([data-disabled], [aria-disabled="true"]) {
--_gcd-a-color: var(--wpds-color-foreground-interactive-neutral-disabled);

background-color: var(--wpds-color-background-interactive-neutral-weak-disabled);
Expand Down Expand Up @@ -378,20 +379,20 @@
content: "\2196";
}

.item[data-popup-open]:not([data-disabled]) .item-description,
.item[data-popup-open]:not([data-disabled]) .item-suffix,
.item[data-popup-open]:not([data-disabled]) .item-shortcut,
.item[data-popup-open]:not([data-disabled]) .item-trailing,
.item[data-highlighted]:not([data-disabled]) .item-description,
.item[data-highlighted]:not([data-disabled]) .item-suffix,
.item[data-highlighted]:not([data-disabled]) .item-shortcut,
.item[data-highlighted]:not([data-disabled]) .item-trailing,
.item[data-highlighted]:not([data-disabled]) .item-selection-indicator,
.item[data-disabled] .item-description,
.item[data-disabled] .item-suffix,
.item[data-disabled] .item-shortcut,
.item[data-disabled] .item-trailing,
.item[data-disabled] .item-selection-indicator {
.item[data-popup-open]:not([data-disabled], [aria-disabled="true"]) .item-description,
.item[data-popup-open]:not([data-disabled], [aria-disabled="true"]) .item-suffix,
.item[data-popup-open]:not([data-disabled], [aria-disabled="true"]) .item-shortcut,
.item[data-popup-open]:not([data-disabled], [aria-disabled="true"]) .item-trailing,
.item[data-highlighted]:not([data-disabled], [aria-disabled="true"]) .item-description,
.item[data-highlighted]:not([data-disabled], [aria-disabled="true"]) .item-suffix,
.item[data-highlighted]:not([data-disabled], [aria-disabled="true"]) .item-shortcut,
.item[data-highlighted]:not([data-disabled], [aria-disabled="true"]) .item-trailing,
.item[data-highlighted]:not([data-disabled], [aria-disabled="true"]) .item-selection-indicator,
.item:is([data-disabled], [aria-disabled="true"]) .item-description,
.item:is([data-disabled], [aria-disabled="true"]) .item-suffix,
.item:is([data-disabled], [aria-disabled="true"]) .item-shortcut,
.item:is([data-disabled], [aria-disabled="true"]) .item-trailing,
.item:is([data-disabled], [aria-disabled="true"]) .item-selection-indicator {
--_gcd-heading-color: currentColor;

color: inherit;
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/utils/css/item-popup.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@
}

.item-label {
--_gcd-heading-color: currentColor;

min-width: 0;
}

Expand Down