Howdy, Stranger!

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

Changing link colors with tags

Hello! I've looked around, but couldn't figure out the answer to this one (I'm probably overlooking something).

I'm using tags to change the appearance of certain pages in my Twine game (I'm using 1.3.5). I've got this:

body[data-tags~=sand] {
  background-color:#702963;
  color: black;
}
.passage[data-tags~=sand] {
  margin: 0em;
  padding: 0em;
  background-color: #F0DC82;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  overflow-y: auto;
}

which does everything I want it to, but I'm not sure what to add in order to change the link color. I tried adding a color: !important, but that didn't do anything. I changed the initial link color with this - a { color: #123524 !important; } -, but can't seem to use the tags with it...

Comments

  • The best advice I can give you here is to check out this page:

    http://www.glorioustrainwrecks.com/node/5163

    You'll find screenshots and full code for L's stylesheets. The code is annotated so you can easily see which selectors to use to modify link CSS.
  • Link CSS for Twine is different between 1.3 and 1.4. If you know how to use CSS and it's just not working for no apparent reason, then I have no idea.

    Would advise to go to 1.4.1 as soon as possible.
  • Alright, thanks. I'll be switching to the newer Twine after this one's done!
  • Why wait? I doubt there's anything that will break, but if so (and you don't feel like fixing it real quick), go back to the old one.
  • Just to be sure: Is your rule of the following form?
    .passage[data-tags~=sand] a {
    color:#ffffff;
    }
  • Sharpe wrote:

    Link CSS for Twine is different between 1.3 and 1.4. If you know how to use CSS and it's just not working for no apparent reason, then I have no idea.

    Would advise to go to 1.4.1 as soon as possible.
    It's not necessarily that different.  "a.internalLink" should be of equal specificity with ".passage a". The main reason I went with ".passage a" is because it works for internal links, external links, AND html <a> elements inserted manually.
Sign In or Register to comment.