gruntjs - how can you set grunt postCSS options? -


setup postcss in gruntfile, convenient way handle autoprefixing , minification, using following code.

postcss: {   options: {     map: false, // inline sourcemaps      processors: [       require('autoprefixer-core')({       browsers: ['last 10 versions', 'ie 9'],       remove: false,       map: true,     }), // add vendor prefixes     require('cssnano')() // minify result   ] }, style: {   src: '<%= dirs.sassbuild %>/style.css',   dest: '<%= dirs.publiccss %>/style.min.css' }, admin: {   src: '<%= dirs.sassbuild %>/admin.css',   dest: '<%= dirs.publiccss %>/admin.min.css' } 

},

the horror, discovered mangling rgba values, making them hsla, converting crafted rem units pc, adjusting z-indexes, , god knows else.

i understand these "features" of postcss, none of want.

having had @ of documentation not obvious me a) can disable behaviour, or b) how grunt.

is possible take control of these features specifically?

the optimisations cssnano can found at: http://cssnano.co/optimisations/.

you can disable optimisations setting option false. instance disable postcss-calc:

require('cssnano')({calc: false}) // minify result 

you wrote rem values converted px values far understand neither autoprefixer nor cssnano perform conversion.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -