Background color for text in SugarCube

First of all, a black shadow won’t show up on Twine’s black background. You said that you had background images, so maybe this isn’t the problem. Still, for testing purposes, I’m going to use red to make it more visible.

We also need to choose a selector. Text isn’t a valid selector, p is a valid HTML element and thus a valid selector but it isn’t ideal in this case.

Instead there are a few options.

To apply the shadow to every passage in the story, put this in one of your stylesheets (that is, inside a passage tagged stylesheet).
.passage {text-shadow: 2px 2px 2px red;}

If you want to do this in just one passage instead of every passage, you can instead add this at the end of one story passage — not in a stylesheet.

<style>.passage {text-shadow: 2px 2px 2px red}</style>

To apply to the shadow to every passage plus the sidebar, create a stylesheet with:
body {text-shadow: 2px 2px 2px red}

Note that the numbers are horizontal offset, vertical offset, and blur

1 Like