sass - What am I doing wrong with npm susy and grunt?
问题描述
I am trying to compile my scss files using susy, node-sass, grunt-sass I added all these dependencies using npm install. I am adding the setup for grunt like
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%);
}
but this throws an error
Fatal error: no mixin named pad
How do I fix this?
解决方案
The latest versions of Susy (3.x) do not include any mixins. In order to use the old mixins, you will have to downgrade to a 2.x version of Susy (2.2.14 is the latest). Or check out the docs to get started with Susy 3.
I'm not sure if there are any other issues in the setup as well…</p>
推荐阅读
- python - 串行顺序 Python Django 框架中的多个任务
- javascript - Object.create vs. new(类或构造函数)
- ffmpeg - FFMPEG“无法为 'udp:// 找到合适的输出格式
: '" - rust - Rust 从 lib.rs 导入函数
- c - 如何访问C中的接口设备?
- javascript - 如何查找导致pm2重启的错误
- c++ - /usr/bin/ld: 找不到 -lc++
- node.js - 错误:解封信封错误:意外的 EOF
- android - 将uri存储在SQLite数据库中,由于权限而无法从uri打开PDF
- json - 将 JSON 配置动态转换为 Typescript 类