I’m animating links using the ::after pseudo element. When you hover over a link, a 2px bar animates to the full length of the link.
a {
position: relative;
display: inline-block;
color: $copper;
font-weight: $regular;
text-decoration: none;
@include link-trans;
&::after {
content: '';
display: block;
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: $copper;
transition: width .3s;
}
}
a:hover,
a:focus {
color: $copper;
text-decoration: none;
&::after {
width: 100%;
}
}
You can see it working in the main flyout navigation:
But on any page where I use Beaver Builder, the effect dies. The ::after pseudo element is not created by the browser. Try the main navigation on the homepage:
removed for client privacy
I’ve spent hours troubleshooting this. I’m pretty sure it is due to some way that Beaver Builder controls the DOM.
Any ideas as to why? or how to get around this?
Thanks for your help.