Media queries don't work in sass

Here is a sample code

@media only screen (max-width: 750px)

  .ic
    display: inline-block
Author: Air, 2017-11-10

3 answers

Всему виной может быть вложенность... Эта проблема и в less 
Смысл такой, если в примере такая конструкция 

        html, body
           width: 100%;
           height: 100%;
           #wrapper
            width: 100px;
            height: 100px;

То в css при компиляции записывается так

    html, body{
           width: 100%;
           height: 100%;
        }
           html, body #wrapper{
            width: 100px;
            height: 100px;
           }
а когда ты задаешь @media


    @media only screen (max-width: 750px)
            #wrapper
            width: 100px;
            height: 100px;


что бы изменить только wrapper не слушает медиа

надо дописать в медиа и вложенность
@media only screen (max-width: 750px)
    html, body
           #wrapper
            width: 100px;
            height: 100px;
 2
Author: Air, 2017-11-10 09:12:33

Perhaps there is a problem with nesting, as Air writes, but the obvious jamb is the absence of and in the media query. The code should be like this:

@media only screen and (max-width: 750px) {
  .ic {
    display: inline-block
  }
}
 0
Author: Игорь, 2017-11-10 11:10:00

Correct the syntax:

@media only screen (max-width: 750px)
{
  .ic{
    display: inline-block;
  }
}
 -1
Author: Mikl, 2017-11-10 09:02:36