0 votes
by (2.4k points)

This evening has been full of wonders...

Does anybody knows how to double use custom styles ?
I'd love to do something like : 

 

@@#Processing; color:red; Processing...@@

 

So that what's in "#Processing" would be "Processing..." written in red ! 
But so far, I didn't manage to...

Thanks a lot for your help.

And have a good evening.

2 Answers

+1 vote
by (68.6k points)
selected by
 
Best answer

That should work.  You do not, generally, add spaces though.  For example: 

@@#Processing;color:red;Processing...@@

by (2.4k points)
Damn, you're right once again. The space was causing the issue.
Thanks a lot !
0 votes
by (63.1k points)
If you mean what I think you do, just move your style rules to your story Stylesheet.

For example (the toolbar isn't displaying for me, so I can't use the code tags):

#processing {
    color : red;
}

Then, in passage:

@@#processing;Processing...@@

Any text or element given the '#processing' id will now be red. Note that if you want multiple elements in the same passage to have red text, you'll need to use a class, which is prefixed by a dot rather than a hash:

.processing {} in css

@@.processing;@@ in passage
by (2.4k points)

That's interesting as well, I had no idea you could do that. 
But then, is it possible to change the content of the story stylesheet from within the story ? I was aiming to do something of that kind : 

 @@#Connect; color:red;Connecting...@@

<<timed 2s>>

        <<replace '#Connect'>>

@@color:green;Connected !@@ 

         <</replace>> 

<</timed>>


<<timed 4s>>

              <<remove '#Connect'>>

<</timed>>
 

by (63.1k points)
Well, what you should probably do is define classes for your styles then add and remove those as needed, rather than creating another span inside the original span just to change the text color.

That said, what you're doing works, to its probably not a big deal.

Anyway, I think I just misread the question, so ignore me if TME got you the answer you were looking for.
...