It’s awesome, exactly what I needed, so I found the bits I’ll like to use and copy-paste it into the stylesheet, except two things.
One, twine doesn’t let the background element and the text element overlap, there will be a strip on the background on top and the words all below it.
I’ve tried many things, putting the text element inside the background element solves that issue but another one pops up, the thing at the bottom which makes the ragged edges also does that to the words and I have no idea how to fix this.
Or if this is not fixable, where can I find examples for a different parchment-like background?
Basically this will stretch the background to your passage height (which is determined by the amount of text) or 900 pixels, whichever is larger. You may want to change the min-height value to something smaller but it will not look much like a piece of paper if you make the height too short.
The HTML structure of the main Story area of a SugarCube project looks something like…
<div id="story" role="main">
<div id="passages">
<div id="passage-start" data-passage="Start" class="passage">
/* The contents of the 'current' Passage goes here... */
</div>
</div>
</div>
The CSS rules you linked to is expecting a specific HTML structure, as shown in the HTML panel in the CodePen editor. So you will likely need to rename some of the CSS selectors being used by those rules (eg. #parchment to #story) for it to work correctly with the default SugarCube HTML structure.