Howdy, Stranger!

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

Can I Change Link Colour And Text Style In The Stylesheet?

I am using Harlowe. I know that you can change the background and text colour using the Stylesheet:
html {
	background-color: black;
	color: grey;
}

But I was wondering if you could also use this to change text style instead of writing it out every time. So, if I wanted everything blurred. I've tried this:
html {
	background-color: black;
	color: grey;
        style: blur;
}

But it doesn't change anything. Do I write "text-style:"? Am I doing something wrong? Or is there no way to do this. Also, I was wondering if you could change the colour of all the links in the Stylesheet. I have pasted this code into the Stylesheet:
tw-hook[style*="color:"] tw-link, tw-hook[style*="color:"] .enchantment-link {
	color: inherit;
}

So I can just write "(text-color: "red")[Link]". But can you change all the link colours using the Stylesheet.

If none of these things can be done, that's fine!

Thanks

Comments

  • edited August 2016
    "style: blur" is a custom thing down by Harlowe and so not a valid css thing in general. It probably uses javascript or something to do it.

    To do it in css you can do something like
    html {
    color: transparent;
       text-shadow: 0 0 5px rgba(0,0,0,0.5);
    }
    

    That was just taken from googling "css blurred text".

    You can definitely change colour of all links in the harlowe stylesheet, but you'd have to alter the correct entry. Links are usually designated "a" so it'd be something like
    a {
    color: red;
    }
    

    But you'd need to fit that into wherever Harlowe draws its link css from, which I don't know out of lack of familiarity with Harlow.
  • This hasn't helped as I don't know where to fit it in either, but thanks anyway! :smile:
  • This comment in the Harlowe -Changing color of text when hovering over a link thread shows the four main CSS selectors used to style link in Harlowe.

    The following is the exact CSS Harlowe uses for the (text-style: "blur") macro:
    text-shadow: rgb(0, 0, 0) 0em 0em 0.08em;
    color: transparent;
    
  • Deadshot wrote: »
    This hasn't helped as I don't know where to fit it in either, but thanks anyway! :smile:

    To find that you look at the original story format's stylesheet in the source.
  • What does this mean?
  • edited August 2016
    It means when making any changes to css you first look at the original stylesheet, either with a notepad editor or something like Chrome dev tools.

  • greyelf wrote: »
    This comment in the Harlowe -Changing color of text when hovering over a link thread shows the four main CSS selectors used to style link in Harlowe.

    The following is the exact CSS Harlowe uses for the (text-style: "blur") macro:
    text-shadow: rgb(0, 0, 0) 0em 0em 0.08em;
    color: transparent;
    

    This works, so thanks, but is there a way to also change the colour even with this CSS? Because it changes the colour to 'transparent', and I want it red. Is that possible?
  • Deadshot wrote: »
    Is that possible?
    Did you try setting it to red and see what happens?

    Here is more information about CSS color values
  • Yeah, I set it to red but it just stayed as default black.
  • Deadshot wrote: »
    Yeah, I set it to red but it just stayed as default black.
    You replaced the transparent keyword with a red colour-keyword and it stayed black?
    html {
    	text-shadow: rgb(0, 0, 0) 0em 0em 0.08em;
    	color: red;
    }
    
  • Oh, right, I'll try that.
  • Thanks, it works!
Sign In or Register to comment.