luca.p.alexandru
luca.p.alexandru

Reputation: 1750

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

Upvotes: 0

Views: 229

Answers (1)

A. Zheng
A. Zheng

Reputation: 138

@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.

Upvotes: 3

Related Questions