/
outthevoid
/
frontend_developer_module_2
Обзор
Документация
Войти
/
outthevoid
/
frontend_developer_module_2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
source/sass/modules/header.scss
256 строк
4 KB
darthmorgot
Мелкие правки стилей.
18 май 2024, 16:12
18 май 2024, 16:12
bfd983c
Код
Авторство
О чём код?
// Header .header { position: fixed; right: 0; left: 0; z-index: 10; &--nojs { position: static; } } .nav { @media (min-width: $desktop-width) { display: flex; justify-content: center; background-color: $black-light; } &__top { display: flex; justify-content: space-between; padding: 23px 20px; background-color: $ebony-clay; @media (min-width: $tablet-width) { padding-top: 27px; padding-bottom: 42px; } @media (min-width: $desktop-width) { padding-left: 78px; background-color: transparent; } &--close-menu { padding-top: 22px; padding-bottom: 21px; background-color: $black-light; @media (min-width: $tablet-width) { padding-top: 27px; padding-bottom: 43px; } @media (min-width: $desktop-width) { background-color: transparent; } } } &__menu-button { padding: 0; color: $white; @media (min-width: $tablet-width) { align-self: flex-end; } @media (min-width: $desktop-width) { display: none; } &--open { width: 50px; height: 24px; margin-top: -1px; } &--close { width: 23px; height: 23px; @media (min-width: $tablet-width) { margin-bottom: 1px; } } } &__menu-button:hover { color: $cerise-red; } &__menu-button:active { color: $cerise-red-light; } &__menu-button:focus { outline: 1px solid $cerise-red; outline-offset: 2px; } &__list { padding: 0; margin: 0; color: $white; list-style: none; background-color: $ebony-clay; box-shadow: 0 1px 0 0 $black; @media (min-width: $desktop-width) { display: flex; flex-wrap: wrap; align-items: center; padding-bottom: 5px; margin-left: 155px; background-color: transparent; box-shadow: none; } } &__item { box-shadow: 0 1px 0 0 $black inset, 0 2px 0 0 $white-transparent inset; @media (min-width: $desktop-width) { margin-right: 79px; box-shadow: none; } } &__item:nth-child(2) { @media (min-width: $desktop-width) { margin-top: -1px; } } &__item:nth-child(3) { @media (min-width: $desktop-width) { margin-right: 80px; margin-top: -1px; } } &__link { display: block; padding-top: 16px; padding-bottom: 16px; font-size: 18px; font-weight: 700; line-height: 32px; text-transform: uppercase; text-align: center; &--current { @media (min-width: $desktop-width) { border-bottom: 2px solid $white; } } @media (min-width: $desktop-width) { padding-bottom: 11px; font-weight: 400; line-height: 18px; text-transform: none; } &:hover { color: $cerise-red; } &:active { color: $cerise-red; opacity: 0.3; @media (min-width: $desktop-width) { color: $white; } } &:focus { outline: 1px solid $cerise-red; outline-offset: 2px; } } &--nojs &__top--close-menu { background-color: $ebony-clay; @media (min-width: $desktop-width) { background-color: transparent; } } &--nojs &__menu-button { display: none; } &--nojs .toggle { display: block; @media (min-width: $desktop-width) { display: flex; } } } .header-logo { display: block; width: 74px; height: 23px; color: $white; &:hover { color: $cerise-red; } &:active { color: $white; opacity: 0.3; } &:focus { outline: 1px solid $cerise-red; outline-offset: 2px; } @media (min-width: $tablet-width) { width: 145px; height: 40px; } .tablet-logo, .desktop-logo { display: none; } @media (min-width: $tablet-width) { .mobile-logo, .desktop-logo { display: none; } .tablet-logo { display: inline; } } @media (min-width: $desktop-width) { .mobile-logo, .tablet-logo { display: none; } .desktop-logo { display: inline; } } } .nav .toggle { display: none; @media (min-width: $desktop-width) { display: flex; } }