Skip to content

Commit

Permalink
Fix hover on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlltz committed Oct 14, 2024
1 parent 079c12b commit f3e438c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/NavBar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@
font-size: 18px;
display: block;

&:hover {
/* On mobile devices, the hover effect should not be applied since it's left on hover after clicking */
@media (hover: hover) {
&:hover {
background-color: yellow;
color: black;
}
}

&:active {
background-color: yellow;
color: black;
}
Expand Down

0 comments on commit f3e438c

Please sign in to comment.