Replacing gulp-minify-css with cssnano
This commit is contained in:
parent
0f4f0bcc87
commit
87e4b18123
|
@ -1 +1 @@
|
||||||
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{-webkit-transition:height .5s ease-in-out;-moz-transition:height .5s ease-in-out;-ms-transition:height .5s ease-in-out;-o-transition:height .5s ease-in-out;transition:height .5s ease-in-out}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-controls .owl-dot,.owl-carousel .owl-controls .owl-nav .owl-next,.owl-carousel .owl-controls .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loaded{display:block}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel .owl-refresh .owl-item{display:none}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.owl-carousel.owl-text-select-on .owl-item{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.owl-carousel .owl-grab{cursor:move;cursor:-webkit-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.no-js .owl-carousel{display:block}.owl-carousel .owl-item .owl-lazy{opacity:0;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;-webkit-transition:scale .1s ease;-moz-transition:scale .1s ease;-ms-transition:scale .1s ease;-o-transition:scale .1s ease;transition:scale .1s ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transition:scale(1.3,1.3);-moz-transition:scale(1.3,1.3);-ms-transition:scale(1.3,1.3);-o-transition:scale(1.3,1.3);transition:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;-webkit-background-size:contain;-moz-background-size:contain;-o-background-size:contain;background-size:contain;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1}
|
.owl-carousel .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:a;animation-name:a}@-webkit-keyframes a{0%{opacity:1}to{opacity:0}}@keyframes a{0%{opacity:1}to{opacity:0}}.owl-height{-webkit-transition:height .5s ease-in-out;transition:height .5s ease-in-out}.owl-carousel{display:none;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translateZ(0)}.owl-carousel .owl-controls .owl-dot,.owl-carousel .owl-controls .owl-nav .owl-next,.owl-carousel .owl-controls .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loaded{display:block}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel .owl-refresh .owl-item{display:none}.owl-carousel .owl-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel.owl-text-select-on .owl-item{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.owl-carousel .owl-grab{cursor:move;cursor:-webkit-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.no-js .owl-carousel{display:block}.owl-carousel .owl-item .owl-lazy{opacity:0;-webkit-transition:opacity .4s ease;transition:opacity .4s ease}.owl-carousel .owl-item img{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;-webkit-transition:scale .1s ease;transition:scale .1s ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transition:scale(1.3,1.3);transition:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;-webkit-transition:opacity .4s ease;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1}
|
File diff suppressed because one or more lines are too long
11
gulpfile.js
11
gulpfile.js
|
@ -8,7 +8,7 @@ var gulp = require('gulp');
|
||||||
var plumber = require('gulp-plumber');
|
var plumber = require('gulp-plumber');
|
||||||
var sass = require('gulp-sass');
|
var sass = require('gulp-sass');
|
||||||
var watch = require('gulp-watch');
|
var watch = require('gulp-watch');
|
||||||
var minifyCSS = require('gulp-minify-css');
|
var cssnano = require('gulp-cssnano');
|
||||||
var rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
var concat = require('gulp-concat');
|
var concat = require('gulp-concat');
|
||||||
var uglify = require('gulp-uglify');
|
var uglify = require('gulp-uglify');
|
||||||
|
@ -33,20 +33,21 @@ gulp.task('sass', function () {
|
||||||
// Starts watcher. Watcher runs gulp sass task on changes
|
// Starts watcher. Watcher runs gulp sass task on changes
|
||||||
gulp.task('watch', function () {
|
gulp.task('watch', function () {
|
||||||
gulp.watch('./sass/**/*.scss', ['sass']);
|
gulp.watch('./sass/**/*.scss', ['sass']);
|
||||||
gulp.watch('./css/theme.css', ['minifycss']);
|
gulp.watch('./css/theme.css', ['cssnano']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
// gulp minifycss
|
// gulp nanocss
|
||||||
// Minifies CSS files
|
// Minifies CSS files
|
||||||
gulp.task('minifycss', ['cleancss'], function(){
|
gulp.task('cssnano', ['cleancss'], function(){
|
||||||
return gulp.src('./css/*.css')
|
return gulp.src('./css/*.css')
|
||||||
.pipe(plumber())
|
.pipe(plumber())
|
||||||
.pipe(rename({suffix: '.min'}))
|
.pipe(rename({suffix: '.min'}))
|
||||||
.pipe(minifyCSS({keepBreaks:false}))
|
.pipe(cssnano({discardComments: {removeAll: true}}))
|
||||||
.pipe(gulp.dest('./css/'));
|
.pipe(gulp.dest('./css/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('cleancss', function() {
|
gulp.task('cleancss', function() {
|
||||||
return gulp.src('./css/*.min.css', { read: false }) // much faster
|
return gulp.src('./css/*.min.css', { read: false }) // much faster
|
||||||
.pipe(ignore('theme.css'))
|
.pipe(ignore('theme.css'))
|
||||||
|
|
|
@ -28,13 +28,14 @@
|
||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.0",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
"gulp-ignore": "^2.0.1",
|
"gulp-ignore": "^2.0.1",
|
||||||
"gulp-minify-css": "^1.2.3",
|
|
||||||
"gulp-plumber": "^1.1.0",
|
"gulp-plumber": "^1.1.0",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "^1.2.2",
|
||||||
"gulp-rimraf": "^0.2.0",
|
"gulp-rimraf": "^0.2.0",
|
||||||
"gulp-sass": "^2.2.0",
|
"gulp-sass": "^2.2.0",
|
||||||
"gulp-uglify": "^1.5.2",
|
"gulp-uglify": "^1.5.2",
|
||||||
"gulp-watch": "^4.3.5",
|
"gulp-watch": "^4.3.5",
|
||||||
|
"gulp-cssnano": "^2.1.1",
|
||||||
"merge2": "^1.0.1"
|
"merge2": "^1.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,18 +14,39 @@ font-size:inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Separate sticky wrapper from main content
|
// Separate sticky wrapper from main content
|
||||||
.wrapper#wrapper-sticky {border-bottom:1px solid $gray-lighter;}
|
.wrapper#wrapper-sticky {
|
||||||
|
border-bottom:1px solid $gray-lighter;
|
||||||
|
}
|
||||||
|
|
||||||
// Necessary WP classes
|
// Necessary WP classes
|
||||||
.wp-caption {font-size: inherit;}
|
.wp-caption {
|
||||||
.wp-caption-text {font-size: inherit;}
|
font-size: inherit;
|
||||||
.screen-reader-text {font-size: inherit;}
|
}
|
||||||
.alignright {font-size: inherit;}
|
|
||||||
.alignleft {font-size: inherit;}
|
.wp-caption-text {
|
||||||
.aligncenter {font-size: inherit;}
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-reader-text {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alignright {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alignleft {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aligncenter {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
//Post design
|
//Post design
|
||||||
.entry-footer span {padding-right:10px;}
|
.entry-footer span {
|
||||||
|
padding-right:10px;
|
||||||
|
}
|
||||||
|
|
||||||
//Limit featured image size to 100%
|
//Limit featured image size to 100%
|
||||||
img.wp-post-image, article img, figure {
|
img.wp-post-image, article img, figure {
|
||||||
|
|
Reference in New Issue