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