Hi. I'm very new to Twine so I imagine this is an easy fix. I want to have the background color in my game change based on the time of day, (which is mapped to a variable). When the time of day changes, I use <<addclass "body" "class">> and it works, but the second I move onto a new passage the background goes back to its default color so it looks like the class isn't saved. Is there a way to keep class additions through passage changes. I am using sugarcube by the way.
The Passage Tag based CSS Styling feature of SugarCube (v1.x and v2.x) assigns CSS classes to the body element, this feature is removing the custom CSS classes you are adding to the same element when the story moves from one passage to another.
As you want to dynamically add your custom CSS classes I suggest moving them to the html element.