border-bottom: 4px solid crimson;
Starting with the CSS stylesheet above, I would like to be able to change the background color of certain areas on the fly, when the player clicks a link. For example, if the player is in a location tagged "forest" (which starts with a Beige backgroundColor) and clicks an element of text displayed as "green forest" the appearance of all similarly tagged pages should immediately and everafter be changed to a Green Background.
I am working in Twine 2, Sugarcube 2.28.2
I done a lot of research on this question already (with google) and the closest I've come is this line of code
<<linkreplace "Change Color">>
document.body.style.backgroundColor = "Green";
Which applies the change immediately, but also globally (rather than being tag specific). Also, this seems to change the colors of the edges of the window, rather than the background behind the text itself.