Answer the question
In order to leave comments, you need to log in
Why doesn't the shorthand font: font-size/line-height, font-family compile with gulp-sass?
in the output file, the font property is missing
scss:
font: 19px "open sans";
line-height: 30px;
max-width: 550px;
line-height: 30px;
max-width: 550px;
var gulp = require("gulp");
var scss = require("gulp-sass");
var cleanCSS = require("gulp-clean-css");
const { series, parallel } = require("gulp");
gulp.task("scss", function () {
return gulp
.src("./css/scss/pages/*.scss")
.pipe(scss())
.pipe(cleanCSS({ level: 2 }))
.pipe(gulp.dest("./css/"));
});
gulp.task("watch", function () {
gulp.watch("./css/scss/**/*.scss", gulp.series("scss"));
});
gulp.task("default", gulp.series("watch"));
Answer the question
In order to leave comments, you need to log in
sass has nothing to do with it. It should compile as expected. But clean-css may have transformed the rule or moved it to another selector.
try without clean-css
gulp.task("scss", function () {
return gulp
.src("./css/scss/pages/*.scss")
.pipe(scss())
.pipe(gulp.dest("./css/"));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question