Skip to content

Instantly share code, notes, and snippets.

@PikachuEXE
Created April 26, 2013 05:04
Show Gist options
  • Save PikachuEXE/5465133 to your computer and use it in GitHub Desktop.
Save PikachuEXE/5465133 to your computer and use it in GitHub Desktop.
Hoverable Similar to Toggleable But this one does not require script
// This class use direct selector '>' since you might want to use it nested way
// Like hover menu, then hover button
.hoverable-container {
& > .hoverable-content.on-hover {
display: none;
}
&:hover {
// Hide the default one
& > .hoverable-content {
display: none;
}
// Display the hover one
& > .hoverable-content.on-hover {
display: inherit;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment