Reply To: How to make keypress add a CSS class to text

PennController for IBEX Forums Support How to make keypress add a CSS class to text Reply To: How to make keypress add a CSS class to text

#10638
Jeremy
Keymaster

Hi Larissa,

Instead of using .css you could indeed add the rules in the CSS file under .PennController-words { and the result would be equivalent

The current rule in the CSS file targets .PennController-words .word, that is, elements with the class word that are children of elements with the class .PennController-words. We make sure to add the class word to each span inside the Text element (see the map function) so that selector does target each word individually, as intended

Jeremy