Using libsass with compass

馋奶兔 提交于 2019-11-30 08:30:28

In our case (>100.000 LoCSS), we succesfully moved from grunt-contrib-compass to a combination of

grunt-sass

which is using libsass instead of the ruby version, and to get all the magic from compass, we included

compass-mixins

and it worked just fine. You should definitely try it out, we reduced our compilation time from more than 40sec down to just 500-600ms.


UPDATE 2

Here's a node module that automagically imports the lib mentioned above into your grunt enviroment:

https://github.com/haithembelhaj/compass-importer

UPDATE

Creating a port to libsass is clearly on the creators mind: https://github.com/Compass/compass/issues/1916

This is answer for sass files (not scss). Please always differentiate them

  1. Run in shell bower install compass-sass-mixins
  2. Edit your sass file @import "bower_components/compass-sass-mixins/lib/compass"

or

  1. Run in shell npm i compass-sass-mixins
  2. Edit your sass file @import "node_modules/compass-sass-mixins/lib/compass"

List of functions: https://github.com/askucher/compass-sass-mixins

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!