From 0c32d8eac4d90fe65b29333fce518602d2078ed5 Mon Sep 17 00:00:00 2001 From: Jory Tindall Date: Fri, 27 Sep 2024 15:54:34 -0700 Subject: [PATCH 1/4] Updated label and icon color in interactive checkmark variant --- .../src/styles/components/dropdown.scss | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/components/src/styles/components/dropdown.scss b/packages/components/src/styles/components/dropdown.scss index 1ed123ce83..1255710ca3 100644 --- a/packages/components/src/styles/components/dropdown.scss +++ b/packages/components/src/styles/components/dropdown.scss @@ -48,7 +48,13 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; cursor: pointer; } - @include hds-focus-ring-with-pseudo-element($top: -1px, $right: -1px, $bottom: -1px, $left: -1px, $radius: $hds-dropdown-toggle-border-radius); + @include hds-focus-ring-with-pseudo-element( + $top: -1px, + $right: -1px, + $bottom: -1px, + $left: -1px, + $radius: $hds-dropdown-toggle-border-radius + ); &:active, &.mock-active { @@ -209,7 +215,7 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; background: none; border: none; inset: 0; - } + } } .hds-dropdown { @@ -218,7 +224,7 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; &[popover]:popover-open { display: flex; - } + } } } @@ -287,7 +293,6 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; padding: 10px 16px 12px; } - // HDS::DROPDOWN::LIST-ITEM::DESCRIPTION .hds-dropdown-list-item--variant-description { @@ -446,7 +451,9 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; --current-color-active: var(--token-color-foreground-action-active); &::after { - --current-focus-ring-box-shadow: var(--token-focus-ring-action-box-shadow); + --current-focus-ring-box-shadow: var( + --token-focus-ring-action-box-shadow + ); } } } @@ -463,7 +470,9 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; &::after { --current-background-color: var(--token-color-surface-critical); - --current-focus-ring-box-shadow: var(--token-focus-ring-critical-box-shadow); + --current-focus-ring-box-shadow: var( + --token-focus-ring-critical-box-shadow + ); } } } @@ -510,7 +519,11 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; .hds-dropdown-list-item--variant-checkmark-selected { .hds-dropdown-list-item__interactive { - color: var(--token-color-foreground-action); + color: var(--token-color-foreground-primary); + + .hds-dropdown-list-item__checkmark { + color: var(--token-color-foreground-action); + } } } @@ -531,7 +544,6 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; cursor: not-allowed; } - // HDS::DROPDOWN::LIST-ITEM::CHECKBOX & HDS::DROPDOWN::LIST-ITEM::RADIO .hds-dropdown-list-item--variant-checkbox, From 6204e9878736fa11f6f44099e42dcc8ff5f45c29 Mon Sep 17 00:00:00 2001 From: Jory Tindall Date: Fri, 27 Sep 2024 15:56:24 -0700 Subject: [PATCH 2/4] Added changeset --- .changeset/odd-poets-complain.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/odd-poets-complain.md diff --git a/.changeset/odd-poets-complain.md b/.changeset/odd-poets-complain.md new file mode 100644 index 0000000000..c1b837a64e --- /dev/null +++ b/.changeset/odd-poets-complain.md @@ -0,0 +1,5 @@ +--- +"@hashicorp/design-system-components": patch +--- + +`Dropdown` - Update the color of the text and icons in the selected state checkmark list item to match the styling of the others. From 1c39078e19a9b98f5b69beac5e2b350b65caa81e Mon Sep 17 00:00:00 2001 From: Jory Tindall Date: Mon, 30 Sep 2024 22:48:22 -0700 Subject: [PATCH 3/4] Refactored to simplify the style declaration --- packages/components/src/styles/components/dropdown.scss | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/components/src/styles/components/dropdown.scss b/packages/components/src/styles/components/dropdown.scss index 1255710ca3..09978eb7ad 100644 --- a/packages/components/src/styles/components/dropdown.scss +++ b/packages/components/src/styles/components/dropdown.scss @@ -518,12 +518,8 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius; // HDS::DROPDOWN::LIST-ITEM::CHECKMARK .hds-dropdown-list-item--variant-checkmark-selected { - .hds-dropdown-list-item__interactive { - color: var(--token-color-foreground-primary); - - .hds-dropdown-list-item__checkmark { - color: var(--token-color-foreground-action); - } + .hds-dropdown-list-item__checkmark { + color: var(--token-color-foreground-action); } } From 99af51a953792d6d216c3c936755abb7f3319931 Mon Sep 17 00:00:00 2001 From: Jory Tindall Date: Tue, 1 Oct 2024 12:51:32 -0700 Subject: [PATCH 4/4] Cleanup of changeset --- .changeset/odd-poets-complain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/odd-poets-complain.md b/.changeset/odd-poets-complain.md index c1b837a64e..4ca5898d11 100644 --- a/.changeset/odd-poets-complain.md +++ b/.changeset/odd-poets-complain.md @@ -2,4 +2,4 @@ "@hashicorp/design-system-components": patch --- -`Dropdown` - Update the color of the text and icons in the selected state checkmark list item to match the styling of the others. +`Dropdown` - Update the color of the text and icons in the selected state checkmark list item to match the styling of the ListItems (`Radio` and `Checkbox`).