D
D
dhat2016-11-21 02:13:17
css
dhat, 2016-11-21 02:13:17

Why is there an error when compiling SCSS?

When compiling, Galp throws an error:

events.js:160
      throw er; // Unhandled 'error' event
      ^
Error: source/scss/base/_mixins.scss
Error: Invalid CSS after "...180px !default;": expected 1 selector or at-rule, was "=from($device)"
        on line 5 of source/scss/base/_mixins.scss
>> $widescreen: 1180px !default;
   -----------------------------^

    at options.error (/home/jd/flexboxgrid/node_modules/node-sass/lib/index.js:283:26)

Here is the piece of code where the error is indicated:
// Responsiveness

$tablet: 769px !default
$desktop: 980px !default
$widescreen: 1180px !default

=from($device)
  @media screen and (min-width: $device)
    @content

=until($device)
  @media screen and (max-width: $device - 1px)
    @content

What does expected 1 selector or at-rule, was "=from($device)" mean - where is the error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2016-11-21
@dhat

The code you showed is SASS code - you have the scss extension, so you need to place parentheses and a semicolon

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question