Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

CSS tagged stylesheet not working

edited February 2015 in Help! with 2.0
Hey everyone,

I've been testing out Twine and for some reason I can't get the CSS stylsheet to affect .passage selectors. I've got this:
body{background-color: cornsilk;}

.passage {color: red;}
I've tried it on Safari and Chrome; on both, the background color changes correctly. However, on Safari the text stays black and on Chrome it disappears completely. What am I doing wrong?

I'm running Mac OSX 10.8.5.

EDIT: I figured out what that issue was (wrong story format), but I can't figure out how to do tagged stylesheets. Is that even possible on 2.0 anymore?

Comments

  • You need to state which story format you are using as answers can change depending on the format.

    Currently only SugarCube has support for Passage Tag based CSS selectors, place the following in your story's stylesheet:
    (note: Any passage without the dull tag will have a orange background and those with a dull tag will be grey.)

    /* Default Styles */
    body {background-color: orange;}

    /* Styles for all passages with a 'dull' tag */
    body.dull {background-color: grey;}

    Which CSS selectors you need to use to style your story depends on which Story Format you are using.
  • Ah, sorry, I forgot to mention it. I was using Harlowe but have since switched to SugarCube.

    Your code works great! I imported someone's stylesheet so trying to get everything to switch over when I change the tag will take a while, but I should be able to figure out the rest on my own.
Sign In or Register to comment.