Skip to content

Instantly share code, notes, and snippets.

@kaspar-allenbach
Last active January 24, 2018 15:27
Show Gist options
  • Save kaspar-allenbach/6987508305d12296e0fc4deff821aac5 to your computer and use it in GitHub Desktop.
Save kaspar-allenbach/6987508305d12296e0fc4deff821aac5 to your computer and use it in GitHub Desktop.
Hambuerger Toggle Button
@mixin fade($fadeValue: color) {
transition: $fadeValue 0.3s linear;
-webkit-transition: $fadeValue 0.3s linear;
-moz-transition: $fadeValue 0.3s linear;
}
$hamburgerLineSize: 5px;
$hamburgBtnSize: 20px;
.mmenuToggle {
@include smUp {
display: none;
}
@include fade(opacity);
&:hover {
opacity: 0.5;
}
position: absolute;
left: 10px;
top: 10px;
width: $hamburgBtnSize;
height: $hamburgBtnSize;
border-top: solid $hamburgerLineSize $txtColor;
&:before, &:after {
content: "";
border-top: solid $hamburgerLineSize $txtColor;
width: 100%;
height: 100%;
position: absolute;
}
&:before {
top: $hamburgerLineSize;
}
&:after {
top: $hamburgerLineSize;
}
}
#mobileMenu:not( .mm-menu ) {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment