I have a codepen here: https://codepen.io/tylerjms7/pen/ZEEvRyV where I’ve used the :target pseudo class as a way of opening and closing a modal.
The problem is when I take that exact same code and apply it to a Wordpress site with Pro on it here: https://goals.brandoncollins.org/test-target it doesn’t work.
Basically the styles aren’t being applied to the :target element for some reason. But I can’t figure out why. The thing that is weird is that if I open that link in a new tab with the #creategp at the end the style will work initially to open the modal. When I click the close icon it also works to remove the styles and hide the modal as expected. But then clicking the modal again won’t work just as before.
So why aren’t the styles being applied? Also, why are they being applied on a new tab?