Getting error after dodging to sass-3.1.8

after upgrading to sass-3.1.8 form sass-3.1.7 I get this error:

Functions may only be defined at the root of a document. 

any idea how i can solve this?

I use some of the bourbon mixins, and it is imported to the top of my style sheets, that's all.

+6
source share
3 answers

I have the same problem and I could not solve it by changing the code.

I decided to use an older version:

 gem uninstall sass gem install sass -v 3.1.1 
+11
source

Good. Here's what I came up with:

The SASS team decided to make changes (in this case, “Functions can only be defined in the root document”), which made some plugins incompatible. in my case it was a bourbon library. I made a ticket on the github bourbon homepage , and the owner updated the code and released a new version that works with the latest api.

I think this change should have had a larger option to indicate the api change.

+1
source

Sass developer is here. Mixins and functions should never have been allowed in context. Recently, a bug was fixed that caused them to be caught in the imported file (before this fix, they were caught only if they were defined in the main sass file).

However, this is not a function that we are clearly against, but we would need to properly test, document and maintain it as an official function.

+1
source

Source: https://habr.com/ru/post/898418/


All Articles