Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

media query expression must begin with '(' in double interpolation #1886

Closed
DzmVasileusky opened this issue Feb 7, 2017 · 1 comment
Closed

Comments

@DzmVasileusky
Copy link

node-sass version v4.0.5 (the latest I can get through npm install node-sass -g).

getting error 'media query expression must begin with '(''

$somevariable: '600px';

$viewport-visibility_breakpoints: (
  xs: 'screen and (max-width: '#{$somevariable}')'
);

@media #{map-get($viewport-visibility_breakpoints, xs)} {
  .test {
    display: none;
  }
}

Earlier I used Grunt with grunt-sass and such a code was compiled without any problems.

@DzmVasileusky
Copy link
Author

Well, I overcame the issue with spaces between strings and interpolations:

$somevariable: '600px';

$viewport-visibility_breakpoints: (
  xs: 'screen and (max-width: ' #{$somevariable} ')'
);

@media #{map-get($viewport-visibility_breakpoints, xs)} {
  .test {
    display: none;
  }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants