Skip to content
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

Update checkmark ListItem styling #2464

Merged
merged 4 commits into from
Oct 1, 2024
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
5 changes: 5 additions & 0 deletions .changeset/odd-poets-complain.md
Original file line number Diff line number Diff line change
@@ -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 ListItems (`Radio` and `Checkbox`).
24 changes: 16 additions & 8 deletions packages/components/src/styles/components/dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -209,7 +215,7 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
background: none;
border: none;
inset: 0;
}
}
}

.hds-dropdown {
Expand All @@ -218,7 +224,7 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;

&[popover]:popover-open {
display: flex;
}
}
}
}

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
);
}
}
}
Expand All @@ -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
);
}
}
}
Expand Down Expand Up @@ -509,7 +518,7 @@ $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 {
.hds-dropdown-list-item__checkmark {
color: var(--token-color-foreground-action);
}
}
Expand All @@ -531,7 +540,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,
Expand Down