Howdy, Stranger!

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

text in mark tag showing up yellow?

This might be a super obvious question, but I've done some googling and can't seem to find the answer anywhere! My apologies in advance if this has been answered before.

I'm using Twine 2 Harlowe in Firefox. I'm familiar with both Twine 1 and CSS, and I'm currently just playing around with Twine 2/Harlowe to get a sense of the formatting and what I can do.

Here's my issue - I have a section of text that I want styled specifically. Based on the documentation, I thought I could just use standard HTML CSS syntax, as long as I put it in between the mark <mark> tags, and Twine would render it as it is.

This is what I'm talking about
<mark>
<style="font-size: 36px; font-weight: 900; color: blue">Hello world</style>
</mark>

However, none of this seems to work! Not only do the properties in my style tag seem to be ignored, but any text I put in between the <mark> tags comes back highlighted yellow...? Is this something I can fix in the main story stylesheet, or is there something I'm missing? If I do want to do some inline CSS here and there, what's the best way to do this in Harlowe?

Thank you so much in advance!

Comments

  • After reading the last sentence in the Style markup section and looking at the example in the HTML markup section I can understand why you may be confused. The mark element mentioned/shown is an actual HTML element, not a part of Harlowe's markup.

    The second problem with your example is that the HTML style element does not work the way you are trying to use it. You could modify the style element to something like the following:
    <span style="font-size: 36px; font-weight: 900; color: blue">Hello world</span>
    
    ... or you could use Harlowe's (css: ) macro:
    (css: "font-size: 36px; font-weight: 900; color: blue")[Hello world]
    
  • thank you so much! this is exactly what i needed :)
Sign In or Register to comment.