Merge pull request #219 from google/uncss_filter
Adding ignore filters to uncss so that the slide out menu works
This commit is contained in:
commit
c9ae83a019
@ -95,6 +95,10 @@ gulp.task('styles', ['styles:components', 'styles:scss', 'styles:css']);
|
|||||||
|
|
||||||
// Scan Your HTML For Assets & Optimize Them
|
// Scan Your HTML For Assets & Optimize Them
|
||||||
gulp.task('html', function () {
|
gulp.task('html', function () {
|
||||||
|
|
||||||
|
// CSS Selectors for UnCSS to ignore
|
||||||
|
var ignore_css_selectors = [".navdrawer-container.open", /.app-bar.open/];
|
||||||
|
|
||||||
return gulp.src('app/**/*.html')
|
return gulp.src('app/**/*.html')
|
||||||
.pipe($.useref.assets({searchPath: '{.tmp,app}'}))
|
.pipe($.useref.assets({searchPath: '{.tmp,app}'}))
|
||||||
// Concatenate And Minify JavaScript
|
// Concatenate And Minify JavaScript
|
||||||
@ -104,7 +108,7 @@ gulp.task('html', function () {
|
|||||||
// Remove Any Unused CSS
|
// Remove Any Unused CSS
|
||||||
// Note: If not using the Style Guide, you can delete it from
|
// Note: If not using the Style Guide, you can delete it from
|
||||||
// the next line to only include styles your project uses.
|
// the next line to only include styles your project uses.
|
||||||
.pipe($.if('*.css', $.uncss({ html: ['app/index.html','app/styleguide/index.html'] })))
|
.pipe($.if('*.css', $.uncss({ html: ['app/index.html','app/styleguide/index.html'], ignore: ignore_css_selectors })))
|
||||||
.pipe($.useref.restore())
|
.pipe($.useref.restore())
|
||||||
.pipe($.useref())
|
.pipe($.useref())
|
||||||
// Update Production Style Guide Paths
|
// Update Production Style Guide Paths
|
||||||
|
Loading…
x
Reference in New Issue
Block a user