Questions tagged [uncss]

UnCSS is a tool that removes unused CSS from your stylesheets. It works across multiple files and supports Javascript-injected CSS.

References

62 questions
1
vote
0 answers

grunt uncss cannot seem to set the css path

I have setup a uncss grunt task. my html files are in the 'public' folder my css ares in 'public/css'. I setup my grunt task like so: uncss: { dist: { files: { 'faq.min.css' : ['public/faq.html'] } …
Mike W
  • 391
  • 4
  • 14
1
vote
1 answer

Is it possible to ignore a file with unCSS in Gulp?

I've been looking through google to find a way to do what I want but did not succeed. Here's my gulp task gulp.task('less', function() { return gulp.src('css/*.less') .pipe(less()) .pipe(stripCssComments({ all:…
Antonin Cezard
  • 2,011
  • 1
  • 17
  • 30
1
vote
1 answer

gulp uncss function error when running

I am trying to use gulp uncss in my my laravel project but can’t seem to get the syntax correct. My gulp task is: gulp.task('uncss', function() { return gulp.src('public/output/final.css') .pipe(uncss({ …
pdoak
  • 721
  • 8
  • 21
1
vote
1 answer

gulp-uncss 'TypeError' undefined when used with gulp-if

I started loving gulp but I've been having too many cryptic errors that are very hard to find and at the end I'm working for my gulpfile.js instead of doing my job. Anyway, I tried gulp-uncss before, outside gulp-useref and therefore outside…
Neithan Max
  • 11,004
  • 5
  • 40
  • 58
1
vote
0 answers

Grunt UnCSS doesn't work for me

I'm trying to use "uncss" with grunt, i do all the process, i followed this guide but got no success, the page doesn't show anything, here are my files, i don't know what happens. Maybe someone with more experience in this can help. Also would like…
Jonathan Solorzano
  • 6,812
  • 20
  • 70
  • 131
1
vote
2 answers

Gulp Uncss Breaks Bootstrap Dropdown Navbar Navigation

I want to use uncss on a big css file of mine, but doing that breaks the dropdown of my bootstrap navigation. Here is the working part: http://metalotechnika.com And here is the part, where I used the uncss: http://metalotechnika.horyzon.de. You…
LoveAndHappiness
  • 9,735
  • 21
  • 72
  • 106
1
vote
0 answers

UNCSS command line under Windows for Sites with Authentication

I have a multipage web application written using AngularJs, Bootstrap 3 and HTML5. I was planning to use UNCSS to optimise my CSS. I do not use grut or such workflow/build mechanism. But have node.js installed in my machine. Can I run UNCSS at the…
Ishan Hettiarachchi
  • 1,426
  • 2
  • 19
  • 31
0
votes
0 answers

VSCode Uncss Error: ENOENT: no such file or directory, open

I have VSCode, I have installed NodeJS, I have installed NPM. I was trying to get UNCSS working but cannot seem to get past some errors. Following this guide here: https://www.youtube.com/watch?v=DX7McYRGJ8o&t=1s I ran npm i parcel-bundler -g Then I…
EVCV
  • 11
  • 2
0
votes
1 answer

UnCSS for Node.js 10 - dependency missing for Canvas

I get the following error. I've tried to force the installing of the canvas package but with no luck. Does the following error mean that I have to find a way to install the dependency of uncss? uncss http://www.ilcomuneinforma.it/viaggi/ >…
Revious
  • 7,816
  • 31
  • 98
  • 147
0
votes
1 answer

Why is 'inline' called after 'scss' in this gulpfile?

I'm trying understand some of the details of this gulpfile from foundation-emails-template. Here is an excerpt from the file for the part I am curious about: // Build the "dist" folder by running all of the below tasks gulp.task('build', …
flyingL123
  • 7,686
  • 11
  • 66
  • 135
0
votes
1 answer

How does grunt uncss task work internally

I have written grunt uncss task to remove the unused css in my code. But its removing a lot of css which is being used in my code. I guess the reason is, its not checking for css inside the directive 'my-directive' Here is my index.html:
jass
  • 343
  • 3
  • 15
0
votes
1 answer

PurifyCSS with Bootstrap | Nav-Tab not working

I've build a simple Bootstrap 3 page and wanted to increase the load speed using PurifyCSS. Everything works fine (even the carousel), however the Nav-Tabs are not working. I have included links to the Purified and Raw CSS RAW Bootstrap…
Klapperstorch
  • 69
  • 1
  • 7
0
votes
1 answer

Grunt Uncss PhantomJS Wordpress ReferenceError: Can't find variable: JQuery

I am using grunt-uncss on MAMP with a WordPress site. I have taken all my css files and combined them into one file. result: one url takes 40 minutes to complete. That can't be efficient. In addition uncss just spits out the same css out that it…
user3795286
  • 136
  • 1
  • 14
0
votes
1 answer

gulp uncss unexpectedly removing some "ignored" classes

I'm using gulp uncss. This is my task code: gulp.task('uncss', () => { return gulp.src($uncss.src) .pipe(uncss({ html: JSON.parse(require('fs').readFileSync('./sitemap.json', 'utf-8')), ignore: [/\.no-\w+/g, /\.is-\w+/g,…
magicspon
  • 926
  • 2
  • 9
  • 28
0
votes
1 answer

Getting proper sourcemaps (gulp sass + cleanCss + prefixer + uncss)

What is best way to chain gulp for compiling sass into clean css (prefixed, un-CSSed and minified). Following example creates sourcemaps, but they are pointing to wrong line numbers in source files when viewed in browser inspector. var plugins =…
ramin
  • 157
  • 15