Howdy, Stranger!

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

nth-child on Twine 2.0 ?

Hello,
I'm currently writing my first interactive novel thanks to Twine 2.0 (Harlowe), which is a pretty cool thing to do of my evenings.

I tried to stylized a bit my story with a bit of CSS, but I encountered a problem with a CSS option.
I want my links to appear one by one, not in the same time, you know ?

So I tried first to select my 2nd link :
tw-link:nth-child(2){color:red !important;}

But this ins't working, and I don't understand why ! Do you have any idea why ? Maybe you have a solution for me ?

Thank you !
E.

Comments

  • edited March 2017
    You should always state the story format you're using and its version, because advice will tend to vary based on that information.


    I'm going to assume that you're attempting to use either (link-goto:) macros or double square bracketed links—i.e. —which are converted into (link-goto:) macro calls internally.

    Your example selector cannot not work with those links because the markup of (link-goto:) macros have their <tw-link> elements wrapped in <tw-expression> elements. You probably want something like the following:
    tw-expression:nth-child(2) tw-link {
    	color: red;
    }
    
Sign In or Register to comment.