Last active
July 12, 2019 08:43
-
-
Save meduzen/c55f32cc9327118da0b7acd57a459e7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IE & Edge do not support :focus-within, so they ignore the 3 selectors. | |
@media screen and (min-width:896px) { | |
.sub-nav:target, | |
.sub-nav__parent:focus-within .sub-nav, | |
.sub-nav__parent:hover .sub-nav { | |
opacity: 1; | |
visibility: visible; | |
} | |
} | |
// By removing the line with :focus-within, IE & Edge apply the rules. | |
@media screen and (min-width:896px) { | |
.sub-nav:target, | |
.sub-nav__parent:hover .sub-nav { | |
opacity: 1; | |
visibility: visible; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This behaviour is in line with the CSS spec:
Thanks to @Mamboleoo.