elearning/Frontend-Learner/node_modules/postcss-merge-longhand/src/lib/insertCloned.js

15 lines
387 B
JavaScript
Raw Normal View History

2026-01-13 10:46:40 +07:00
'use strict';
/**
* @param {import('postcss').Rule} rule
* @param {import('postcss').Declaration} decl
* @param {Partial<import('postcss').DeclarationProps>=} props
* @return {import('postcss').Declaration}
*/
module.exports = function insertCloned(rule, decl, props) {
const newNode = Object.assign(decl.clone(), props);
rule.insertAfter(decl, newNode);
return newNode;
};