mirror of
https://github.com/Nezumi-2711/html-css-practice-two.git
synced 2026-09-22 05:31:51 +00:00
60 lines
836 B
SCSS
60 lines
836 B
SCSS
$width-icon-menu: 36px;
|
|
|
|
.icon-menu {
|
|
@include base-icon-menu;
|
|
|
|
position: relative;
|
|
width: $width-icon-menu;
|
|
cursor: pointer;
|
|
|
|
&:before {
|
|
@include icon-menu;
|
|
|
|
top: -10px;
|
|
width: $width-icon-menu;
|
|
}
|
|
|
|
&:after {
|
|
@include icon-menu;
|
|
|
|
top: 10px;
|
|
width: $width-icon-menu;
|
|
}
|
|
}
|
|
|
|
.toggle-menu {
|
|
position: absolute;
|
|
top: 46px;
|
|
right: 21px;
|
|
width: 36px;
|
|
height: 27px;
|
|
cursor: pointer;
|
|
z-index: 1;
|
|
opacity: 0;
|
|
}
|
|
|
|
.toggle-menu:checked ~ .icon-menu {
|
|
background: transparent;
|
|
}
|
|
|
|
.toggle-menu:checked ~ .icon-menu:before {
|
|
top: 0;
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
.toggle-menu:checked ~ .icon-menu:after {
|
|
top: 0;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.toggle-menu:checked ~ .nav-list {
|
|
right: 0;
|
|
}
|
|
|
|
@media screen and (min-width: 840px) {
|
|
.icon-menu,
|
|
.toggle-menu {
|
|
display: none;
|
|
}
|
|
}
|