spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Bug]: ActionButton: --mod-* vars not working anymore if combined

Open spdev3000 opened this issue 6 months ago • 4 comments

Code of conduct

  • [x] I agree to follow this project's code of conduct.

Impacted component(s)

ActionButton

Expected behavior

users have the possibility to use custom --mod-* vars to style ActionButtons, this should work for all provided states, such as hover, down (active) and `disabled, so I would expect to have this working when providing combination of (for example):

   --mod-actionbutton-border-color-default: var(--spectrum-global-color-static-gray-400);
    --mod-actionbutton-border-color-hover: var(--spectrum-global-color-static-gray-500);
    --mod-actionbutton-border-color-down: var(--spectrum-global-color-static-gray-700);
    --mod-actionbutton-background-color-default: var(--spectrum-global-color-static-gray-75);
    --mod-actionbutton-background-color-hover: var(--spectrum-global-color-static-gray-200);
    --mod-actionbutton-background-color-down: var(--spectrum-global-color-static-gray-300);
    --mod-actionbutton-background-color-disabled: var(--spectrum-global-color-static-gray-300);

Actual behavior

Providing those --mod-* vars together overrides the different state vars, such as *-hover, *-down or *-disabled on the current actionbutton.css and no change of colors is rendered.

Screenshots

No response

What browsers are you seeing the problem in?

Chrome

How can we reproduce this issue?

  1. Go to https://stackblitz.com/edit/vitejs-vite-dqvm9txc?file=src%2Fmy-element.js
  2. Compare different styles of customized actionbutton
  3. Try hovering or clicking on the buttons - no visible change
  4. Also see disabled button that doesn't change when combination of css custom mods are provided

Sample code or abstract reproduction which illustrates the problem

No response

Severity

SEV 4

Logs taken while reproducing problem

No response

Would you like to track this issue in Jira?

  • [ ] Yes, please tell me the ticket number!

spdev3000 avatar May 28 '25 09:05 spdev3000

maybe related to #5267 ?

spdev3000 avatar May 28 '25 09:05 spdev3000

@spdev3000 Can you please check if this solved from your end if this related to #5267 ?

Rajdeepc avatar Jul 07 '25 10:07 Rajdeepc

Stackblitz still shows the error with latest versions.

spdev3000 avatar Jul 07 '25 11:07 spdev3000

I tested in latest version 1.9.1 and this is still broken, can this be fixed in next releases please? @rubencarvalho

spdev3000 avatar Nov 28 '25 11:11 spdev3000