In this section you will dynamically change the color of the word-viewer when the play direction changes.

The classMap directive is a Lit directive that can dynamically toggle a list of classes on an element. classMap takes an object as an argument in which each key is treated as a class name, and if the value is truthy, the class is added to the element.

Add the backwards class to the <pre> element when this.playDirection is -1.

Now when this.playDirection === -1, the <pre> element will gain the class backwards. Use your developer tooling to confirm this!

Add a selector and styles for .backwards.

The word-viewer in the preview should turn violet when playing backwards.