Howdy, Stranger!

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

SugarCube and HTML Passage Tags

So, I've been using SugarCube's method of "tagged stylesheets", and it's been working great, except for one thing. I want to be able to modify the html tag depending on which passage tag is used. For example:
html.begin {
background-image: linear-gradient(to bottom, #202020, black);
background-image: -webkit-linear-gradient(top, #202020, black);
background-attachment: fixed;
}
would change the background image of all passages tagged "begin" to this specific gradient, but it doesn't seem to work. Any way I could get this operational? It's a bit vital to my story. And also, thanks in advance to TheMadExile  :)

Comments

  • I just remembered the <<addclass>> macro, and it works fine. Silly me.
  • You're doing that on the document element and not on the body element, why now?  What I mean is that the following should work:

    body.begin {
    background-image: -webkit-linear-gradient(top, #202020, black);
    background-image: linear-gradient(to bottom, #202020, black);
    background-attachment: fixed;
    }
  • Well, I'm using a stylesheet that puts all of the passage content in a box , and the background color behind that is defined in the document tag. If I were to define it in the body tag it would change the background color of the box and make the whole thing look all wonky.
  • Remember to use the <<removeclass> macro as well.

    I pretty much asked the exact same question here, btw: http://twinery.org/forum/index.php/topic,2443.0.html
  • Yeah, I've been using <<removeclass>> as well. I think I had checked your topic, but it had totally slipped my mind at the time, whoops.
Sign In or Register to comment.