0 votes
by (2k points)
Let's say I want to use this class style with the typed animation

.Solomon {
      text-shadow: 0 0 5px white,0 0 5px white,
                 0 0 5px white,0 0 5px white,
                 0 0 5px white,0 0 5px white,
                 0 0 5px white,0 0 5px white;
  color: purple;
  font-weight: bold;
}

I'm trying to do something like this:

@@.typed;.Solomon;--"¿Hola? ¿Sigues con vida?"@@

I want the animation to stay, but I wanna choose different fonts and colors in different passages.

Is it possible?

2 Answers

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

I'm not sure what your typed animation is, but wouldn't the following work?

<span class="typed"><span class="Solomon"></span></span>

Also  - please start using the "Insert Code Snippet" feature in the top left when you want to post code in the future.

by (68.6k points)
Though it would work, adding another container here is unnecessary.
by (2k points)
Thank you, it worked, and I will, I didn't know about it.
+1 vote
by (68.6k points)
In general, yes it is possible.

Specifically to your examples.  What you have there should work as long as you define your override styles after the various Typed style rules.  That is necessary because CSS rules cascade and amongst rules with equal specificity the last seen rule wins.

You could also make your style rules' selectors more specific, but that's not really necessary here.
...