Skip to content

Commit

Permalink
Bug fix: ActionList divider disappears on selected items (#4778)
Browse files Browse the repository at this point in the history
* remove selector

* Create popular-apples-look.md

* snaps
  • Loading branch information
langermank authored Jul 25, 2024
1 parent 3779dbf commit a9730c9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/popular-apples-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Bug fix: ActionList divider disappears on selected items
2 changes: 1 addition & 1 deletion packages/react/src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
// hide divider after dividers & group header, with higher importance!
'[data-component="ActionList.Divider"] + &': {'--divider-color': 'transparent !important'},
// hide border on current and previous item
'&:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]), &:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]), &[data-focus-visible-added]:not([aria-disabled]):not([data-inactive])':
'&:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]), &[data-focus-visible-added]:not([aria-disabled]):not([data-inactive])':
{
'--divider-color': 'transparent',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ exports[`NavList renders a simple list 1`] = `
}
.c2:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c2:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c2[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -208,7 +207,6 @@ exports[`NavList renders a simple list 1`] = `
}
.c7:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c7:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c7[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -563,7 +561,6 @@ exports[`NavList renders with groups 1`] = `
}
.c6:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c6:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c6[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -656,7 +653,6 @@ exports[`NavList renders with groups 1`] = `
}
.c11:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c11:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c11[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -1042,7 +1038,6 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
}
.c11:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c11:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c11[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -1135,7 +1130,6 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
}
.c4:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c4:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c4[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -1514,7 +1508,6 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
}
.c11:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c11:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c11[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -1617,7 +1610,6 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
}
.c4:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c4:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c4[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
}
.c3:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -1555,7 +1554,6 @@ exports[`snapshots renders a multiselect input 1`] = `
}
.c3:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -2304,7 +2302,6 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
}
.c3:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -2386,7 +2383,6 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
}
.c8:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c8:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c8[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -3080,7 +3076,6 @@ exports[`snapshots renders a single select input 1`] = `
}
.c3:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down Expand Up @@ -3551,7 +3546,6 @@ exports[`snapshots renders with a custom text input component 1`] = `
}
.c3:hover:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3:focus:not([aria-disabled]):not([data-inactive]):not([data-loading]),
.c3[data-focus-visible-added]:not([aria-disabled]):not([data-inactive]) {
--divider-color: transparent;
}
Expand Down

0 comments on commit a9730c9

Please sign in to comment.