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

Import directives may not be used within control directives or mixins #1471

Closed
ACastans opened this issue Apr 22, 2016 · 7 comments
Closed

Comments

@ACastans
Copy link

ACastans commented Apr 22, 2016

Hi,

Since today i have this issue on my build.

I use gulp-sass and node-sass is a dependency of it.

I use in several place those kind of condition :

@if(#{$brand} == 'my-brand'){
@import '../../config/_config-my-brand';
}

I have not this issue if I fixed the "node-sass" dependency to "3.4.2" manually in the gulp-sass package.

But since it's incremented with the new version, I can't do anything.

I have see some similar issue but all are closed. Do you have an update on this ?

Regards.

Adrien.

@fuhlig
Copy link

fuhlig commented Apr 22, 2016

It seems related to the 3.5.* update and can be fixed with the 3.4.* version as you stated. Had the same problem at several projects on our CI servers since yesterdays 3.5.* update

Fix:

  • Remove your grunt-sass / gulp-sass
  • set node-sass@3.4.2 in your (dev)dependencies
  • $npm install

Hope this helps
Regards,
Flo

@ACastans
Copy link
Author

ACastans commented Apr 22, 2016

@fuhlig Thanks it seem to make the quick fix.

@node-sass team, do you have a fix for this in the pipe ?

Regards.

Adrien.

@xzyfer
Copy link
Contributor

xzyfer commented Apr 22, 2016

This project is an implementation of the Sass language. Our goal is to be 100% compatible with Sass. These issues you mention are a result of invalid Sass. Node Sass assumes valid Sass is being compiled. This is no different to depending on an undocumented API. For that reason we do not consider these breaking changes.

If valid Sass started breaking we would consider that a breaking change. We don't claim responsibility for bugs in the Sass code being compiled.

If you wish to suggest features of file bugs in the Sass language please open an issue with Sass - https://github.com/sass/sass

In closing if your code does not compile with the official Sass project you should not expect it to compile with Node Sass.

@gorkamolero
Copy link

This isn't closed. The code compiles. Just try to compile bootstrap and see. Please open again.

@xzyfer
Copy link
Contributor

xzyfer commented Jun 29, 2017 via email

@randre70
Copy link

Please re-open.

This project is an implementation of the Sass language. Our goal is to be 100% compatible with Sass. These issues you mention are a result of invalid Sass. Node Sass assumes valid Sass is being compiled. This is no different to depending on an undocumented API. For that reason we do not consider these breaking changes.

See sass/libsass#1724

@xzyfer
Copy link
Contributor

xzyfer commented Mar 25, 2019 via email

jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants