The day before yesterday with a gulp-sass compile sass:
outputStyle: 'compact'
1 gulp.task('sass', function() { 2 return gulp 3 .src('app/scss/**/*.scss') // Gets all files ending with .scss in app/scss and children dirs 4 .pipe(sass({ outputStyle: 'compact' }).on('error', sass.logError)) 5 .pipe(gulp.dest('dist/css')) 6 })
But to get the css is blank lines displayed (and official results are not the same, know the code Friends Guestbook FAQ)
Solution:
Tools: sublime ·
sublime open css file after the variation you, right there css format, four option values inside can get what you want
-
compact compact (not disconnect selector, spaces)
-
compact (no spaces) compact (without spaces)
-
compact (break selector) Compact (OFF selector)
-
compact (break selector, no spaces) Compact (disconnect selector, no spaces)
I'm also curious compact gulp-sass, there is no explanation, but the teacher also said that the source code itself is concerned, it is to compile the final compression.
================================= egg section
Right there is a css format, inside Compressed, you can get the following results Oh! ! (Good strong sublime ah)