Last active
August 29, 2015 14:08
-
-
Save benjaminparry/56a10c36edbfd3a9e671 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
// base | |
.container { | |
width: 100%; | |
// element | |
&__nav { | |
width: 0; | |
// hover modifier on base to affect element | |
// output wanted: .container:hover .container__nav {…} | |
// Hark! This doesn’t work, is this not possible? | |
&:hover & { | |
width: 100%; | |
} | |
} | |
// Best solution so far, shame it can’t be kept DRY and in the &__nav {…} above | |
&:hover &__nav { | |
width: 100%; | |
} | |
} |
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
.container { | |
width: 100%; | |
} | |
.container__nav { | |
width: 0; | |
} | |
.container__nav:hover .container__nav { | |
width: 100%; | |
} | |
.container:hover .container__nav { | |
width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment