I need to apply a background color to a disabled button, but the following did not work and no error is shown in the browser's console.
Question
- Using styling hooks (mentioned here), how can I change the background color of a disabled button?
What I tried that didn't work
myLwc.html
<template>
<lightning-button disabled variant="neutral" label="test" title="test" class="myDisabledClass"></lightning-button>
</template>
myLwc.css
.myDisabledClass {
--slds-c-button-neutral-color-background-disabled: red;
}