Why do some plus signs (+) cause text to underline?

xaratherus

I've noticed recently that when I'm pasting in stat blocks that some (not all) text that starts with a + sign, such as +2 AC, will result in a random length of text after the + being underlined. Is the + an unmentioned markup tag or something? If so, is there a way to get it to NOT do that?

Comments

  • UselessTriviaMan
    UselessTriviaMan
    Posts: 546

    Yeah, plus signs are the markup tag for underlining.

    But if the plus sign is stand-alone with a space immediately after, it won't kick off an underline tag. It's a bit of a pain, but not difficult. I've had to adjust a few stat block tables to avoid this.


    Ptolus, City by the Spire - 2016 Campaign of the Year

    "Please pay attention very carefully, because this is the truest thing a stranger will ever say to you: In the face of such hopelessness as our eventual, unavoidable death, there is little sense in not at least TRYING to accomplish all your wildest dreams in life."  - - Kevin Smith

  • Bortas
    Bortas
    Posts: 645

    ins { color:inherit; text-decoration:inherit;} /* Plus sign no longer underlines */
    ins:before { content:'+';} /* Plus sign no longer underlines */
    ins:after { content:'+';} /* Plus sign no longer underlines */

    Add to your page's custom CSS

    -bort

  • cgregory
    cgregory
    Posts: 780

    Just to add to the code Bortas provided you may wish to add the following additional code to allow you to do underlines.

    CSS

    .u {text-decoration: underline;}

    HTML

    In this sentence <span class="u">underline me</span>.

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

  • xaratherus
    Posts: 3

    Thanks so much! This will make things a LOT easier :D

     

     

  • xaratherus
    Posts: 3

    Hrm. Follow-up and related question: Is there a way to stop minus signs from doing a strikethrough? I tried editing the same CSS from the + sign but it doesn't appear to have worked.

  • cgregory
    cgregory
    Posts: 780

    That would be because the + symbol uses ins while the - symbol uses del. That means you need to use.

    del { color:inherit; text-decoration:inherit;} /* Minus sign no longer strikethrough */

    del:before { content:'-';} /* Minus sign no longer strikethrough */

    del:after { content:'-';} /* Minus sign no longer strikethrough */

    if you need to use strikethrough you can create your own strikethrough class

    CSS

    .st {text-decoration: line-through;}

    HTML

    In this sentence <span class="st">strikethrough me</span>.

     

     

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

Sign In or Register to comment.

April 2024
Season of Strife

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

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

Discussions