I have an anchor within a <div>, the anchor uses conditional styling for it's background and this seems make it so that the a:hover style gets discarded. Actually it doesn't matter if I have conditional or just a fixed color, if I remove the background-style from component.js the hover-effect from style.css kicks in.
My question is how do I achieve the hover effect while still having a conditional background-color?
component.js:
<div>
<a href="#"
style={{
background: (day === 2) && "#f1f1f1"
}} />
</div>
style.css:
div a {
display: block;
}
div a:hover {
background: blue;
}