postcss-merge-longhand
Version:
Merge longhand properties into shorthand with PostCSS.
17 lines (14 loc) • 372 B
JavaScript
import getLastNode from './getLastNode.js';
/**
* @param {Iterable<import('postcss').Declaration>} props
* @param {string[]} properties
* @return {import('postcss').Declaration[]}
*/
function getRules(props, properties) {
return properties
.map((property) => {
return getLastNode(props, property);
})
.filter(Boolean);
}
export default getRules;