1

I have the below lightning-badge component where I am trying to change the background color. The background color is not changing. What could be the issue?

HTML:

 <lightning-badge label={product.ProductStatus} class="new-product"></lightning-badge>

CSS:

.new-product {
    --sds-c-badge-color-background: rgb(6, 6, 155);
  }

1 Answer 1

1

the only thing i see wrong is your css property name:

--sds-c-badge-color-background should be --slds-c-badge-color-background

however, it could well be a copy pasta typo.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.