- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试修复我的 gulp-ccs-comb 任务,但出现此错误:
MacBook-Pro:myProject remy$ gulp sass-comb
[11:23:10] Using gulpfile ~/myproject/gulpfile.js
[11:23:10] Starting 'sass-comb'...
[11:23:10] Finished 'sass-comb' after 5.88 ms
events.js:183
throw er; // Unhandled 'error' event
^
Error: /myPath/sass/helpers/_helpers.scss
Parsing error: Please check the validity of the block starting from line #6
4 | @each $className in $list {
5 | @for $i from 0 through 100 {
6*| @if $i % 5 == 0 {
7 | @each $positionName in $listPosition {
8 | .#{$className}#{$positionName}-#{$i} {
Gonzales PE version: 3.0.0-28
SCSS 文件:
$list: margin padding;
$listPosition: top bottom left right;
@each $className in $list {
@for $i from 0 through 100 {
@if $i % 5 == 0 {
@each $positionName in $listPosition {
.#{$className}#{$positionName}-#{$i} {
#{$className}-#{$positionName}: #{$i}px !important;
}
}
.#{$className}-#{$i} {
#{$className}: #{$i}px !important;
}
}
}
}
我的 scss 语法做错了什么?
感谢您的帮助:)
雷米。
最佳答案
尝试将@for
和@if
更改为@while
。
$list: margin padding;
$listPosition: top bottom left right;
@each $className in $list {
$i: 0;
@while $i <= 100 {
@each $positionName in $listPosition {
.#{$className}#{$positionName}-#{$i} {
#{$className}-#{$positionName}: #{$i}px !important;
}
}
.#{$className}-#{$i} {
#{$className}: #{$i}px !important;
}
$i: $i + 5;
}
}
它对我有用(以及你的代码:)
关于sass - gulp-css-comb : "Please check the validity" 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48261125/
实习测试框架有没有 有任何 gulp 插件或文档可以与 gulp 集成吗? 最佳答案 它看起来不像,但我已经做到了 使用 gulp-shell : gulp.task('intern', shell.
我正在寻找答案,不必深入或详细。只是想确切地知道任务序列发生了什么。 gulp.task('name',['*this right here*'], function() { // conte
假设有四个任务 'a'、'b'、'c'、'd'(b 依赖于 c 和 d;c 和 d 都依赖于 a),因此任务按以下顺序运行: a-> (c, d) -> b 这是相应地工作的 gulpfile.js:
我安装了本地gulp插件,并意识到我不需要它。如何删除它,是否有例如npm remove gulp-sass这样的命令? 最佳答案 只需运行npm uninstall --save即可。转到此链接h
我使用del包删除文件夹: gulp.task('clean', function(){ return del('dist/**/*', {force:true}); }); 但是,如果dis
有一个 super 简单的 gulp 文件,我想在其中依次运行一些基本的 gulp 任务。 我似乎无法在 Gulp v4 中运行它。使用 run-sequence 在 Gulp v3 中有类似的东西而
我目前有这样的文件结构 SASS gulpfile.js node_modules sites example-site scss
我创建了一个简单的 Gulp 任务来检查我的 ES6 文件中的更改。我想转换它们并在出现问题时显示错误消息。 正在显示错误屏幕。但是,当一切都成功时,我想显示不同的信息。 我试过 .on('end')
我已经安装了gulp在全局范围内 sudo npm install --global gulp-cli 和本地 npm install --save-dev gulp /usr/local/bin/g
我正在尝试使用 gulp-rev、gulp-rev-replace 和 gulp-rev-css-url 重写对我的版本图像文件的引用。 我已设法修改文件并将 list 与以下 gulp 代码合并:
尝试创建一个 gulp 任务,通过 LESS 通过管道传输来自不同文件夹的一堆文件,然后将它们输出到基于原始源的文件夹。考虑这个文件夹结构: Project +-- /Module_A | +-
我在终端上的项目文件夹中,并且: 如果我执行: gulp -v 我得到: [15:47:15] CLI version 3.9.0 [15:47:15] Local version 3.9.
设置很简单: gulp.task('rev-js', function() { return gulp.src('/js/main.js, {base: '.'}) .pipe(ne
我有两个任务,B 依赖于 A。 任务A需要循环一个数组,然后执行gulp.dest,但似乎B会在A完成之前执行。 A 所做的就是加载所有 html,并将每个 html 注入(inject)到 temp
我尝试在工作流程中将 gulp-data 与 gulp-jade 结合使用,但收到与 gulp-data 插件相关的错误。 这是我的 gulpfile.js var gulp = require('g
编辑:有没有办法清理这段代码? 任务.咖啡 # Watch pages gulp.task 'jade', -> # Watch index gulp.src('src/jade/index.
这可能听起来很愚蠢,但请耐心等待。我遇到了麻烦。 我正在开发一个使用 Grunt 来编译和构建其发行版的项目。但是,它使用另一个名为 prism 的库,您可以在 http://prismjs.com
我有一个简单的 less 任务的 gulp 工作流程,如下所示: gulp.task('less', function() { gulp.src(source_less) .p
我有一个 gulp 工作流程,一切都运行良好,但似乎它只适用于最上面的文件,例如:public/index.html,但如果我想使用 public/products/item.html,gulp-da
我想使用 gulp-useref 将我所有的 JavaScript 文件连接成一个。 在我的 JavaScript 文件中,我混合了pre-minified 和non-minified 文件。 我只想
我是一名优秀的程序员,十分优秀!