D
D
deniska932021-03-24 12:23:11
css
deniska93, 2021-03-24 12:23:11

Why doesn't @media work in gulp?

I'm working on the second day of the gallop and ran into a problem: media queries do not work, there is no reaction at all. Here is my gallp file

.container {
    max-width: 1170px;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    @media screen and (max-width: 1200px) {
        .container {
            max-width: 1140px;
        }
    }
    @media screen and (min-width: 992px) {
        .container {
            max-width: 960px;
        }
    }
    @media screen and (min-width: 768px) {
        .container {
            max-width: 720px;
        }
    }    
    @media screen and (min-width: 576px) {
        .container {
            max-width: 540px;
        }
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WapSter, 2021-03-24
@deniska93

They work as they should. For .container which is in .container
And also if you specify media screen and (min-width: value), then you need to set from a smaller value to a larger one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question