0 votes
asked by (120 points)

hi! i changed the color of the main passages of my story in the css, but i wanted to know if it was possible to have certain lines be different colors (i have five character that talk, and i would like to make them have different colors for their spoken lines so it's easy to keep track of who is talking). 

what i have in my css is below:

@import url(https://fonts.googleapis.com/css?family=Share+Tech" rel="stylesheet);

.purple tw-passage 
{ 
  color: 960BFC; 
}
 
body, tw-story
{
  font-family: Lora, serif;
  font-size: 18px;
  background-color: #E5AD00;
}

tw-passage 
{ 
  color: #4F2B00; 
} 

and in the actual scene:

<span class='purple'> test </span>

is this possible to do? am i doing something wrong? 

thanks!

1 Answer

0 votes
answered by (57.1k points)
It should just be ".purple", not ".purple tw-passage". The latter means to target the tw-passage element inside the element with the class purple, and you seem to want the opposite.
commented by (120 points)
hi, thank you for responding!

i changed it to just .purple, but the "test" text is still the same color as tw-passage (#4F2B00 instead of #960BFC). do you have any other suggestions?

thanks again!
commented by (57.1k points)
Oh. You're missing the hash (#) in the color property of .purple.
commented by (120 points)
well aren't i embarrassed!!!!! haha wow thank you so much :'D
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...