I want every :hover to automatically inherit the color defined for respective a element, if not defined specifically. color:inherit; doesnt seem to do it, any ideas how to accomplish this?
color: inherit tells the a element to inherit the color from its parent, not its "normal" or "generic" state.
Since :hover is simply a state of the a element, if you don't specify a color for a:hover then it will use whatever color that was already declared for it in, for example, an a rule. So simply don't specify a color. If there's a different value already set and you want to override it, the only way is to set the same color as given in the a rule in the original stylesheet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With