How to update Hyperlink color in Portal

Chaiatnya
Tera Contributor

Hi, I wanted to have a new color for Knowledge article Hyperlink in all places. can some one help where to update it. I updated the CSS variables field of the portal '$link-color:' but it didn't work.

10 REPLIES 10

Ramya V
Kilo Sage

Hi @Chaiatnya,

 

Could you provide more details on where you're trying to change the hyperlink color or share a screenshot? Also, which portal are you working on?

From my understanding, simply updating "$link-color" won’t be enough to change the hyperlink color everywhere. You need to use:

$link-color: colorcode !important;

This will ensure the new color overrides the default (out-of-the-box) styling.

 

Please mark this answer as Helpful if this solution works for you.

 

 

Thanks @Ramya V , 

Please find the screenshot where we are making the changes. We are working on ESC pro portal. Updated as you mentioned, but still no luck.

 

Chaiatnya_0-1740170578702.png

 

Hi @Chaiatnya,

Before changing the hyperlink color in a knowledge article, I created a new stylesheet in the theme that I used for the Employee Center portal.

Screenshot 2025-02-22 at 10.13.34 PM.png

RamyaV_0-1740243590725.png

Screenshot 2025-02-22 at 10.31.01 PM.png

Find the theme you're using in the portal and open its theme record. If you're in the correct application scope, you should see a "New" button. I created a new CSS include named "Custom Style."

RamyaV_1-1740243771651.png

In this CSS include, I added a custom stylesheet with the new style.

RamyaV_2-1740243822898.png

When you inspect the hyperlink of a knowledge article, you can see its class name. By targeting that class, you can override the color as shown in the image above. The hyperlink color has now changed to the color displayed in the image.

Note: After changing the color, check the portal pages to see if the changes are reflected elsewhere, as the same CSS class may be reused.

RamyaV_3-1740243987420.png

 

Please mark this answer as Helpful if this solution works for you.

 

 

 

 

 

@Ramya V Hi, thank you once again. Sorry my query is not clear it seems. I'm looking to update on the hyperlink in the contents of the knowledge article. I tried your solution. It didn't work. Can you please let me know if you have solution for this

 

Chaiatnya_0-1740417351674.png