Skip to content

Instantly share code, notes, and snippets.

@benjaminparry
Last active August 29, 2015 14:08
Show Gist options
  • Save benjaminparry/56a10c36edbfd3a9e671 to your computer and use it in GitHub Desktop.
Save benjaminparry/56a10c36edbfd3a9e671 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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%;
}
}
.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