My button changes its color on :hover, see:
button {
background-color: orange;
}
button:hover {
background-color: darkorange;
}
Example: https://jsfiddle.net/oepb5ks4/
Works great on desktop, but on mobile - where :hover should not exist – the browser* still changes the color, but after touching the button.
- Why is that behavior? Am I missing something? What makes somebody think that implementing (parts of) :hover on mobile browsers makes any sense?
- Is there a nice and clean solution for this (preferably without Media Queries or JavaScript)?
*Tested in Chrome (in "Device Mode") as well as in iOS Safari.