3

Is it possible to use Compass with node-sass? It seems node-sass doesn't know how to import the Compass functions out of the box.

{
  "formatted": "Error: File to import not found or unreadable: compass/css3/box-
shadow\n       Parent style sheet: C:/sandbox/sascar-manager/app/assets/styles/s
ass/project/login.scss\n        on line 1 of sass/project/login.scss\n>> @import
 \"compass/css3/box-shadow\";\n   ^\n",
  "message": "File to import not found or unreadable: compass/css3/box-shadow\nP
arent style sheet: C:/sandbox/app/app/assets/styles/sass/project/logi
n.scss",
  "column": 1,
  "line": 1,
  "file": "C:/sandbox/app/app/assets/styles/sass/project/login.scss",

  "status": 1
}
darksoulsong
  • 13,988
  • 14
  • 47
  • 90

2 Answers2

2

Compass is a collection of sass mixins and functions plus some Ruby extensions. Node-sass is using a libsass library instead, so the Ruby extensions won't work. However, you'll be able to use most of the Compass functionality using this project.

Another option is to use Bourbon instead of Compass. It has very similar set of mixins directly available as a npm package.

See also this quite similar question.

Community
  • 1
  • 1
ronkot
  • 5,915
  • 4
  • 27
  • 41
-2

I have wondered this myself. The answer I believe is 'no' when talking of ruby compass, however there are a couple possible options at least worth investigating....

link to eyeglass on github and compass node

I haven't looked into them closely enough to give you a sure answer, but compass-node may be to compass what node-bourbon is to bourbon, a node-sass port of the library.

LOTUSMS
  • 10,317
  • 15
  • 71
  • 140
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). - [From Review](/review/low-quality-posts/10909740) – CubeJockey Jan 15 '16 at 21:15
  • Sorry, just trying to help since nobody else was. – NickLWilliams Jan 18 '16 at 17:49