Media Query syntax error when compressing the code

0

I'm trying to compress to the maximum the site where I work and for this I'm minimizing the javascripts and css, but this is giving error in the css minimizing well in the codes similar to what I will put here below. It does the syntax validation and it considers this Media Query statement inside the main class as a syntax error, it even works and lets pass, however when compressing and playing on the server it gives problem. Does anyone know why this happens and how to solve it?

Here's an example:

.img-header-home-01 {

background-image: url("../imagens/home/slider-01.jpg");
background-size: cover;
background-attachment: scroll;
background-position: center center;

@media (max-width: @iphone-screen) {
    background-attachment: scroll;
}

}

    
asked by anonymous 09.09.2016 / 15:36

1 answer

0

I've changed your syntax a bit and it worked! Here's the example:

.img-header-home-01 {

background-image: url("../imagens/home/slider-01.jpg");
background-size: cover;
background-attachment: scroll;
background-position: center center;

}

@media (max-width: @iphone-screen) {
    .img-header-home-01 {
         background-attachment: scroll;
    }
}

E mified would look like this:

.img-header-home-01{background-image:url(../imagens/home/slider-01.jpg);background-size:cover;background-attachment:scroll;background-position:center center}@media (max-width:@iphone-screen){.img-header-home-01{background-attachment:scroll}}
    
09.09.2016 / 15:53