我对npm susy和grunt做错了什么?

问题描述 投票:0回答:1

我正在尝试使用susy,node-sass,grunt-sass编译我的scss文件我使用npm install添加了所有这些依赖项。我正在为grunt添加设置

sass: {
      options: {
        implementation: sass,
        sourceMap: true
      },
      dist: {
        options: {
          style: 'expanded',
          require: 'susy'
        },
        files: {
          'app/crossbrand_us/styleguide/css/shared.css': 'app/sass/xb/widgets/advertised-offers/wdgt-advertised-offers-vehicle.scss'
        }
      }
    },
@import "wdgt-advertised-offers-shared";
@import "node_modules/susy/sass/susy";
$wdgt-advertised-offers-vehicle-selector: ".wdgt-advertised-offers-vehicle";

#{$wdgt-advertised-offers-vehicle-selector} {
    @include pad(1%);
 }

但这会引发错误

Fatal error: no mixin named pad

我该如何解决?

sass gruntjs susy-compass susy susy-sass
1个回答
1
投票

Susy(3.x)的latest versions不包括任何mixins。为了使用旧的mixins,你必须降级到2.x版本的Susy(2.2.14是最新版本)。或者查看the docs以开始使用Susy 3。

我不确定设置中是否还有其他问题......

© www.soinside.com 2019 - 2024. All rights reserved.