You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
474 B
24 lines
474 B
'use strict';
|
|
const processors = require('./lib/decl');
|
|
/**
|
|
* @type {import('postcss').PluginCreator<void>}
|
|
* @return {import('postcss').Plugin}
|
|
*/
|
|
function pluginCreator() {
|
|
return {
|
|
postcssPlugin: 'postcss-merge-longhand',
|
|
|
|
OnceExit(css) {
|
|
css.walkRules((rule) => {
|
|
processors.forEach((p) => {
|
|
p.explode(rule);
|
|
p.merge(rule);
|
|
});
|
|
});
|
|
},
|
|
};
|
|
}
|
|
|
|
pluginCreator.postcss = true;
|
|
module.exports = pluginCreator;
|