2

The automatic color of my link using a lightning:formattedUrl is not black and I am trying to change it to the color black. Is there a way to do this, I have tried adding it in the class with color:black and color:#000000 and both did not work. I have also tried fixing with a div around the lightning:formattedUrl block and that did not work either. This is an aura lightning component and NOT a lightning web component.

1 Answer 1

1

I tried to use div around the lightning:formattedUrl like you and it worked. Can you show your code?

<aura:component >
    <div>
        <lightning:formattedUrl class="blackColor" value="www.salesforce.com" />
    </div>
</aura:component>


.THIS .blackColor a{
    color: black !important; 
}

enter image description here

You must log in to answer this question.

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