Did you know that you can animate the content property of pseudo elements? According the list of animatable properties in the spec, you shouldn’t be able to, but in the latest version of desktop Chrome you can. The demo below should animate from “A” to “B” by changing the content property inside a @keyframes animation:

See the Pen Animating the content attribute by Robin Rendle (@robinrendle) on CodePen.

The code

To make a letter-switching demo like above, we make an empty <div> that we