ldc-doux/resources/sass/_menu.scss
Sebastien Hattry a7be310a34 integration
2021-11-18 14:36:06 +01:00

173 lines
No EOL
4.2 KiB
SCSS
Vendored

.menu-overlay__checkbox {
display: none;
}
@media screen and (min-width: 800px){
.menu{
width:40%;
margin-left:300px;
text-transform:uppercase;
&-overlay__btn{
display: none;
}
.menu__list{
display:flex;
justify-content:space-between;
}
a{
display:inline-block;
color:$color-blue;
text-decoration:none;
&:hover{
color:$color-second;
}
&.active{
position:relative;
color:$color-second;
}
&.active:before{
content:"";
position:absolute;
top:-60px;
left:0;
right:0;
width:75px;
height:4px;
margin-left:auto;
margin-right:auto;
background-color: $color-main;
}
}
.only-smrt{
display:none;
}
}
}
@media screen and (max-width: 799px){
.menu{
order:2;
.only-smrt a{
color:$color-second;
}
label {
display: flex;
align-items:flex-start;
justify-content: center;
position: fixed;
width: 2.8em;
height: 2.8em;
z-index: 9999;
}
&__list{
display: none;
}
&__item{
padding:1em;
border-bottom:solid 1px $color-dark;
&:last-child{
border-bottom-width:0;
}
}
.menu-overlay{
position:fixed;
display:flex;
right:0;
z-index:100;
&__icon {
display: block;
position: relative;
width: 1.5em;
height: .1em;
background: $color-light;
transition: .4s;
&:after,
&:before {
content: "";
display: block;
position: absolute;
width: 100%;
height: .1em;
background: $color-light;
border-radius:2em;
transition: .4s;
}
&:before {
top: -10px;
}
&:after {
top: 10px;
}
}
&__btn{
display: flex;
justify-content:center;
align-items:center;
top:0;
right:20px;
justify-content: center;
cursor: pointer;
}
&__checkbox {
&:checked~.menu-overlay__btn .menu-overlay__icon {
background: 0 0;
}
&:checked~.menu-overlay__btn .menu-overlay__icon::before {
transform: rotate(45deg);
}
&:checked~.menu-overlay__btn .menu-overlay__icon::after {
transform: rotate(-45deg);
}
&:checked~.menu-overlay__btn .menu-overlay__icon::after,
&:checked~.menu-overlay__btn .menu-overlay__icon::before {
top: 0;
}
&:checked~.menu__list {
display:flex;
flex-direction: column;
position:fixed;
top:50px;
left:0;
width:100%;
padding-top:1em;
padding-left:1em;
padding-right:1em;
text-transform: uppercase;
background-color:$color-light;
transition-delay: 0s;
box-shadow: 0 2px 8px rgba($color-dark, .20);
}
}
}
}
}
.secondmenu{
display:flex;
justify-content:flex-end;
}
@media screen and (max-width: 799px) {
.secondmenu{
margin-right: 3em;
}
}