<a/> in component return being auto-assigned "button" class somehow, overwriting my classNames
This is the relevant portion of the return:
The problem one is the second
<a/>
.
My CSS is aplying an animation such that when the .footer_link
(each <a/>
) is hovered, its child .footer_icon
(thie <Image/>
) has an animation applied to it.
.footer_link:hover .footer_icon { animation: iconAnimation .4s ease-in-out; transform-origin: center; }I noticed the second
<Image/>
icon here was refusing to animate, so I inspected, and then I discovered that its parent <a/>
is being rendered without any of these react classNames I assigned it, but somehow is getting a button
class applied to it, which I have no idea where that's coming from --- see the picture for the inspector rendering.
So basically the animation isn't happening because there's this weird intervening re-assignment of class "button" to that <a/>
.
All of the other .footer_icon
's are retaining my classNames when rendered and their animations are working.
What could be going on here?7 Replies
did you try restarting the server / hard refresh the browser?. Maybe it's cached
yea just tried that, still getting this 'button' class in the browser somehow.
this is my component return right now:
.footer_quickLinks is getting applied to the other elements, as well as the .footer_link, to the other elements, but not to the problem one
it's also missing the href in the rendered html
yea, i just removed it on purpose to test
is it possible to make a sandbox
Nevermind, I found it, was in the wrong file LOL
Thank you, apologies for that. I'll delete the post.