postcss-custom-properties icon indicating copy to clipboard operation
postcss-custom-properties copied to clipboard

Feature request : Add browserslist support

Open rs459 opened this issue 6 years ago • 0 comments

I've made this, but having custom properties without fallback could be great when my browserslist support it.

var caniuse = require("caniuse-api");
var browserslist = require("browserslist");

var customPropertiesPreserve = caniuse.isSupported("css-variables", browserslist());

module.exports = {
	plugins: {
		'postcss-normalize':{},
		'autoprefixer':{},
		'postcss-custom-properties':{
			'preserve': customPropertiesWithFallback
		},
		'postcss-custom-media':{},
		'postcss-media-minmax':{}
	}
};

rs459 avatar Dec 30 '18 02:12 rs459