patentul patentul - 4 months ago 31
Sass (Sass) Question

Sass unhandled error event

I have a sass file which I want to process. A snippet of the file is:

@media {
.tabs {
@extend .uppercase;
background-color: $light;
border-top: 2px solid $stable;
}
}


When running the gulp file I get the following error:

Error: media query expression must begin with '('
on line 173 of scss/style_common.scss


If I remove the portion, everything runs ok, the css is generated

Answer

@media rules need an expression to go along with it, something like:

@media (min-width: 320px) {
  .tabs {
      @extend .uppercase;
      background-color: $light;
      border-top: 2px solid $stable;
  }
}

The error it's giving you is indicating you are missing the expression part.

see more examples from mozilla's @media docs.