Link color change for specific links in passagea

Twine Version: 2.81
Sugarcube: 2.36.1

I managed to solve the other issues on my own since I am new and I was just starting development, but I’m stuck on this one.

This was in the stylesheet;

.link-internal { color: #8b0000; }

.happiness. > .link-internal {

color: yellow !important; }
.sadness { color: blue !important; }
.link-internal.fear { color: black !important; }
.angered { color: red !important; }
.shock { color: purple !important; }
.disgust { color: green !important;
} .apathy { color: gray !important; }

And this is the code for the passage link I wanted to turn yellow:

<span class="happiness">[[I got it|happiness->Cala happiness response]]</span>

I noticed what happens is that it turns from a deep red to a lighter red for some reason? I wanted to be yellow.

I just needed assistance to find out what I messed up.

If the link is dark read, it means that the link is broken (i.e. Twine can’t send you to the next passage).

And looking at your link I think I found the issue:

Normally the link should be formatted as:

[[Text to Display|PassageName]]
[[Text to Display->PassageName]]
[[PassageName<-Text to display]]

But you’ve mixed both 1 and 2 in your link.

(also, you may want to avoid using !important to the stylesheet unless absolutely necessary. Too many may mess with how things are displayed on the page)


Watch out for the extra dot after happiness :wink:

1 Like

Ok, that’s for pointing that out! Thanks to that I figured out the linking and CSS classes syntax was the issue!

I needed to target the span tags