Skip to content

Instantly share code, notes, and snippets.

@PlenipotentSS
Last active August 29, 2015 14:17
Show Gist options
  • Save PlenipotentSS/12ec003c9c8bb7b485e8 to your computer and use it in GitHub Desktop.
Save PlenipotentSS/12ec003c9c8bb7b485e8 to your computer and use it in GitHub Desktop.
Hammie SCSS
// mobile navigation icon
// using bourbon library
.hammie {
.has-universe & {
top: $universeBarHeight+45+px;
}
display: none;
vertical-align: middle;
@include transition(all .25s ease-in-out);
top: 45px;
position: absolute;
right: 50px;
transform: translateY(-50%);
span {
background-color: $dunn-orange;
position: relative;
display: inline-block;
vertical-align: middle;
width: 30px;
height: 5px;
margin: 14px 0;
@include transition-property (all);
@include transition-duration(120ms);
@include transition-timing-function(ease-in-out);
@include transition-delay(240ms);
&:before, &:after {
background-color: $dunn-orange;
position: absolute;
display: block;
width: 30px;
height: 5px;
content: "";
@include transition-property (all);
@include transition-duration(120ms);
@include transition-timing-function(ease-in-out);
@include transition-delay(240ms);
@include transition(all .25s ease-in-out);
}
&:before { top: -8px; }
&:after { bottom: -8px; }
}
&.is-close-menu-btn {
span {
body.is-active & {
background-color: transparent;
@include transition(all .25s ease-in-out);
}
@include transition-property (all);
@include transition-duration(120ms);
@include transition-timing-function(ease-in-out);
@include transition-delay(160ms);
&:before, &:after {
@include transition-property (all);
@include transition-duration(120ms);
@include transition-timing-function(ease-in-out);
@include transition-delay(160ms);
}
&:before {
top: 0;
@include transform(rotate(45deg));
}
&:after {
bottom: 0;
@include transform(rotate(-45deg));
}
}
}
@include media($devices) {
display: block;
}
@include media($small) {
right: 25px;
top: 56px;
.has-universe & {
top: $universeBarHeight+56+px;
}
span {
width: 32px;
height: 6px;
&:before, &:after {
width: 32px;
height: 6px;
}
&:before { top: -10px; }
&:after { bottom: -10px; }
}
}
@media print {
display: none;
}
}
@PlenipotentSS
Copy link
Author

for html:

<a href="javascript:void(0)" class="hammie"><span></span></a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment