diff --git a/.changeset/orange-walls-buy.md b/.changeset/orange-walls-buy.md new file mode 100644 index 00000000000..29c42bf332c --- /dev/null +++ b/.changeset/orange-walls-buy.md @@ -0,0 +1,5 @@ +--- +"@primer/react": patch +--- + +feat(ActionList): Optimizes CSS selector performance in ActionList by replacing expensive universal selectors (`*`) and broad `:has()` queries with targeted class selectors. diff --git a/packages/react/src/ActionList/ActionList.module.css b/packages/react/src/ActionList/ActionList.module.css index f8007fb3e63..1e24e4d07cf 100644 --- a/packages/react/src/ActionList/ActionList.module.css +++ b/packages/react/src/ActionList/ActionList.module.css @@ -277,8 +277,13 @@ } &:where([data-loading='true']), - &:has([data-loading='true']) { - & * { + & > [data-loading='true'] { + & .ItemLabel, + & .Description, + & .LeadingVisual, + & .TrailingVisual, + & .LeadingAction, + & .VisualWrap { color: var(--fgColor-muted); } }