1

here in my component I have 4 lightning helptext: https://developer.salesforce.com/docs/component-library/bundle/lightning-helptext/example

And my task is to change their icon colors to blue/yellow/green/red. I only got the colors red and yellow using icon-variant="warning" and icon-variant="error". But icon-variant brand or success does not work. Also I've tried using CSS but still no success... is there any way to do it?

2
  • To apply custom styling, use the :host selector or define a custom class using the class attribute. lightning-helptext contains the same customizable elements as lightning-button-icon for the button icon, which supports --sds-c-button-* custom properties. See the lightning-button-icon documentation. Apr 30, 2021 at 20:30
  • Looks like is not possible to achieve green "success" icon color without custom code/component. Here we can see that there is a ticket on the specific team's roadmap to address icon colors across components, however that is not in place right now. Styling Hooks are in preview (not accessible in production orgs) so I belive that only possible way will be custom code/component. May 1, 2021 at 9:25

1 Answer 1

-1
lwc-colorTextIconDefault: red !important;

You can use this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .