1 line
564 B
JavaScript
1 line
564 B
JavaScript
"use strict";const e=["column-gap","gap","row-gap"],creator=o=>{const r=Object.assign({preserve:!0},o);return{postcssPlugin:"postcss-gap-properties",Declaration(o){var s,p;if(!e.includes(o.prop.toLowerCase()))return;if(!(null!=(s=o.parent)&&s.some((e=>"decl"===e.type&&("display"===e.prop.toLowerCase()&&"grid"===e.value.toLowerCase())))))return;const t=`grid-${o.prop.toLowerCase()}`;(null==(p=o.parent)?void 0:p.some((e=>"decl"===e.type&&e.prop.toLowerCase()===t)))||(o.cloneBefore({prop:t}),r.preserve||o.remove())}}};creator.postcss=!0,module.exports=creator;
|