I'm currently writing a segment where light is fading. If the player keeps choosing to push on (as opposed to camping until daylight returns) I darken the text on each subsequent passage so that it becomes difficult to read.
I'm doing this with a simple <span style> in the passage itself, but can't work out how to do the same with the links, too.
Comments
You could possibly use either static or dynamic passage tags to control the CSS (text and links) that gets applied to a set of passages (thus removing the need for a span element).
How you do this depends on the story format.
I was thinking of an overall page opacity, but wouldn't know how to do it for individual passages.
[Edit] I can't quite believe this, but I managed to work it out just from your line about passage tags! I added the tag 'fadinglight' to the passage, and then to the CSS I added .fadinglight {opacity: 0.5}
Thank you a lot.
well done, did you find the Tagged Stylesheet Warning section of SugarCube's excellent documentation?
Oh, I see. It's just confirming that what I did was correct. My success was just one of those rare flukes, helped with a little CSS coding knowledge.
What does this mean from that document?
Am I doing wrong by adding my style changes to the CSS? This sounds like it's saying I should create a passage with the tag 'stylesheet' and add my changes there?
I seem to have failed to upload some of the updates I made to the SugarCube v1.x documentation when I started publishing releases for both versions of Twine. Mea culpa, I'll get that fixed up.