can't highlight text from pseudo element

Hey, i have a heading class that displays a caption underneath it with the text being what's provided in a data attribute. It doesn't let me highlight this text with my cursor though, does anyone know why? Many thanks https://codepen.io/deerCabin/pen/mdYyLdr
2 Replies
Tenkes
Tenkes2mo ago
pseudo elements cannot be selectable, since they are not actually part of the DOM. If you need text to be selectable, you should put text in something like <span> instead
snxxwyy
snxxwyy2mo ago
ohh makes sense, thanks