digitalsparky/jekyll-minifier

CSS assets minification can't be disabled

Closed this issue ยท 3 comments

First of all,
thanks a lot for this great plugin ๐Ÿ˜„

I noticed that the minification of CSS assets can't be disabled with compress_css: false.

It looks like you are using CSSminify2 to minify css files in the output_css function :

compressor = CSSminify2.new

but the compress_css argument is only used with the HTMLCompressor :
compressor = HtmlCompressor::Compressor.new(args)

That why this condition :


will compress the CSS files no matter what.

Could we use the compress_css argument to prevent this too ?

Hi have the same problem; I write SCSS and I use jekyll to minify it, but for some reason I get the output css not valid.

E.g. I get

margin: calc(100%-24px)

Instead of

margin: calc(100% - 24px) 

The space is important in this case.

My walkaround is to set:

jekyll-minifier:
  compress_css: false 
  exclude: '*.css'

Fixed in 0.1.8.