File: /var/www/quadcode-site/src/style/components/dropdown.scss
.dropdown {
&__btn {
display: flex;
cursor: pointer;
}
&__text {
color: $white;
transition: .4s ease;
}
&__arrow {
display: flex;
align-items: center;
position: relative;
overflow: hidden;
&-item {
width: 10px;
height: 7px;
transition: .2s ease;
margin: 0 10px;
&_up {
transform: translateY(-18px);
background-image: url("../assets/resource/arrow-up.svg");
position: absolute;
transition: .2s ease;
}
&_down {
background-image: url("../assets/resource/arrow.svg");
}
}
}
&__list {
position: fixed;
display: block;
left: 0;
right: 0;
top: calc(86px + 48px);
background: $white15;
backdrop-filter: blur(3px);
max-height: 0;
overflow: hidden;
z-index: 20;
transition: .4s ease;
}
&__items {
display: flex;
align-items: center;
justify-content: center;
max-width: 1180px;
margin: 0 auto;
padding: 11px;
}
&__item {
transform: translateY(-8px);
transition: .4s ease .2s;
will-change: transform;
}
&__link {
padding: 0 30px;
color: $white;
transition: .3s ease;
font-weight: 600;
&:hover {
color: $white50;
transition: .3s ease;
}
}
&:hover {
.dropdown {
&__list {
max-height: 100px;
transition: .6s ease;
}
&__item {
transform: translateY(0);
transition: .4s ease;
}
&__arrow {
&-item {
transition: .2s ease;
&_down {
transform: translateY(18px);
}
&_up {
transform: translateY(0px);
}
}
}
}
}
&_active {
.dropdown {
&__text {
color: $white50;
transition: .4s ease;
&:hover {
color: $white;
transition: .4s ease;
}
}
}
}
&_open {
.dropdown {
&__text {
color: $white;
transition: .4s ease;
}
}
}
}