Гамбургер-меню ОК на Firefox, но не в других браузерах - PullRequest
1 голос
/ 20 июня 2020

Не могу понять, почему в мобильном и некоторых других браузерах возникают проблемы с моим меню.

/* ==========================================================================
HEADER
========================================================================== */
header {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    z-index: 99;

    .header__main-text {
        .hero {
            height: 100%;
            background: #333;
            background: rgba(71, 70, 70, 0.596);
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
           // background: linear-gradient(199deg, $white-02 6%, $white 85%),
         // url("../img/1437163.jpg") no-repeat bottom center;
            background-size: cover;
            background-attachment: fixed;
            @include flexCenter;
            padding: 10rem 6rem;

            @include desktop690 {
                padding: 7rem 6rem;
                height: 100vh;
            }

            &__card {
                position: relative;
                box-shadow: $box-shadow-04;
                @include flexCenter;
                border-radius: 0.1rem;
                transition: 0.4s cubic-bezier(0.39, 0.575, 0.565, 1);
                flex-direction: column;
                background: $daniel-blue;
                border-radius: 0.1rem;
                background: #222;
                background-color: $gray-03;
                width: 270px;

                @include desktop690 {
                    flex-direction: row;
                    width: 630px;
                }

                &:hover {
                    @include spl_hover_effect-02; // buttions partial
                }

                &__img {
                    position: relative;
                    width: 270px;
                    height: 400px;


                    @include desktop690 {
                        height: 400px;
                    }

                    img {
                        position: absolute;
                        top: 0;
                        left: 0;
                        bottom: 0;
                        right: 0;
                        width: 60%;
                        height: 60%;
                        margin: auto;
                        border-radius: 0.1rem;
                    }
                }

                &__img::before {
                    content: "";
                    width: 100%;
                    height: 100%;
                    left: 0;
                    position: absolute;
                    background: transparent;
                }


                &__info {
                    position: relative;
                    width: 100%;
                    padding: 25px;
                    @include flexCenter;
                    flex-direction: column;
                    right: 0;
                    @include desktop690 {
                        width: 60%;
                    }

                    h3 {
                        @include h2Text;
                        text-transform: none;
                        padding: 1rem;
                        border-bottom: 2px solid $daniel-yellow;
                        margin: 2rem;
                        color: #fff;
                        color: $white-02;
                    }

                    h2 {
                        @include h2Text;
                        text-shadow: 1px 1px 1px $black;
                        color: #fff;
                        color: $white-02;
                    }

                    p {
                        margin: 2rem;
                        @include bodyText;
                        color: #fff;
                        color: $white-02;
                    }

                    h1::first-letter {
                        color: rgb(245, 213, 33);
                        color: $primary-02;
                        font-size: 5.7rem;
                        margin: 0.1rem;
                        // transform: rotateY(-20deg);
                    }
                }

                &__cta {
                    @include btn_spl;
                }

                &__cta:hover {
                    @include btn_spl_hover;
                }
            }
        }
    }
}

.menu {
    padding: 2rem 2.5rem;
    position: absolute;
    top: 1.3rem;
    right: 1.3rem;
    z-index: 999;
    cursor: pointer;

    @include desktop690 {
        display: none;
    }

    .bar,
    .bar::before,
    .bar::after {
        content: "";
        position: absolute;
        height: 2px;
        width: 3.3rem;
        background: #fff;
        background-color: $white-02;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        transition: 650ms;
    }

    .bar::before {
         position: relative;
        top: -2rem;
    }

    .bar::after {
         position: relative;
        top: 1rem;
    }
}

.active .bar {
    background-color: transparent;
}

.active .bar::before {
    transform: rotate(45deg);
}

.active .bar::after {
    transform: rotate(-45deg);
}

.active .bar::before,
.active .bar::after {
    top: 0;
}

.nav {
    width: 100%;
    height: 6.4rem;
    position: relative;
    background: #222;
    background-color: $gray-03;

    @include desktop690 {
        display: flex;
        justify-content: space-between;
        
    }

    #logo {
        width: 4.7rem;
        height: 4.7rem;
        background: transparent;
        border-radius: 50%;
        position: relative;
        z-index: 999;
        @include flexCenter;
        padding: 0;
        top: 0.9rem;
        left: 2rem;

        img {
            position: absolute;
            width: 100%;
        }
    }

    .overlay {
        background: #777;
        background-color: $gray-03;
        position: fixed;
        right: 0;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1;
        transition: opacity 590ms;
        transform: scale(0);
        opacity: 0;

        @include desktop690 {
            position: initial;
            background: none;
            opacity: initial;
            transform: initial;
        }

        ul {
            position: relative;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            list-style: none;
            margin-top: 0.2rem;

            @include desktop690 {
                flex-direction: row;
            }

            li {
                text-transform: uppercase;
                margin: 1rem 0.1rem;
                @include links;

                @include desktop480 {
                    margin: 0rem 0.1rem;
                }
            }

            li:last-child {
                @include desktop480 {
                    margin-right: 1rem;
                }
            }

            a {
                display: inline-block;
                transition: all 650ms;
                text-decoration: none;
                @include bodyText;
                color: #fff;
                color: $white-02;
                padding: 1.7rem 6rem;
                

                @include desktop690 {
                    padding: 1.7rem;
                }
            }

            a:hover,
            a:active:hover {

                background: rgb(230, 231, 145);
                background: $daniel-blue;
            }
        }
    }
}

.overlay.menu-open {
    transform: scale(1);
    opacity: 1;
}
...