mirror of
https://github.com/kremalicious/blog.git
synced 2024-06-10 11:35:10 +02:00
76 lines
1.1 KiB
SCSS
76 lines
1.1 KiB
SCSS
@import 'variables';
|
|
@import 'mixins';
|
|
|
|
.hamburger {
|
|
width: 24px;
|
|
height: 24px;
|
|
display: inline-block;
|
|
position: relative;
|
|
transform: rotate(0deg);
|
|
cursor: pointer;
|
|
margin-top: $spacer / 2;
|
|
}
|
|
|
|
.hamburgerLine {
|
|
@include transition;
|
|
|
|
display: block;
|
|
position: absolute;
|
|
height: 1px;
|
|
width: 100%;
|
|
border-bottom: $stroke-width solid $brand-grey-light;
|
|
opacity: 1;
|
|
left: 0;
|
|
transform: rotate(0deg);
|
|
|
|
&:nth-child(1) {
|
|
top: 0;
|
|
transform-origin: left center;
|
|
}
|
|
|
|
&:nth-child(2) {
|
|
top: 7px;
|
|
transform-origin: left center;
|
|
}
|
|
|
|
&:nth-child(3) {
|
|
top: 14px;
|
|
transform-origin: left center;
|
|
}
|
|
|
|
// open state
|
|
:global(.has-menu-open) & {
|
|
&:nth-child(1) {
|
|
transform: rotate(45deg);
|
|
top: -1px;
|
|
}
|
|
|
|
&:nth-child(2) {
|
|
width: 0%;
|
|
opacity: 0;
|
|
}
|
|
|
|
&:nth-child(3) {
|
|
transform: rotate(-45deg);
|
|
top: 16px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.hamburgerButton {
|
|
padding: $spacer / 2;
|
|
vertical-align: middle;
|
|
display: inline-block;
|
|
margin: 0;
|
|
margin-right: -($spacer / 2);
|
|
|
|
&:hover,
|
|
&:focus {
|
|
outline: 0;
|
|
|
|
.hamburgerLine {
|
|
border-color: $brand-cyan;
|
|
}
|
|
}
|
|
}
|