Advice Needed: Links No Longer Match Accent Color in Casper - Dark Mode - 4.7.2

Hey Ghost Fam,

I opened a ticket but I thought I’d ask here since it’s the weekend.

Links no longer match accent color in Dark Mode. They’re now matched to the body text which makes them hard to see.

Here’s an example - note the links are now white instead of pink, like the accent color.

I tried to style links via code injection but it affected everything, even the links in the header – rendering them invisible.

Is there a code injection I can use to change links in the body of a post but not the header?

Thanks in advance.


Hi @James_Maxwell

You can use the following snippet to style your links.

html.dark-mode .gh-content a {
  color: var(--ghost-accent-color) !important;

Apart from that, I found the CSS rule which is overriding your default accent color of links.

html.dark-mode .gh-content a:not(.kg-btn):not(.kg-nft-card-container):not(.kg-product-card-button):not(.kg-header-card-button) {
    color: #fff;

If this still doesn’t solve your problem, you can DM me.

1 Like

Perfect – fixed! Thanks for your help. Have a great week.