UNPKG

postcss-merge-longhand

Version:

Merge longhand properties into shorthand with PostCSS.

24 lines (21 loc) 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;