epiphany/node_modules/@csstools/postcss-exponential-functions/dist/index.mjs
2023-12-09 22:48:07 -08:00

1 line
399 B
JavaScript

import{calc as e}from"@csstools/css-calc";const s=new RegExp(`(${["exp","hypot","log","pow","sqrt"].join("|")})\\(`,"i"),creator=o=>{const t=Object.assign({preserve:!1},o);return{postcssPlugin:"postcss-exponential-functions",Declaration(o){if(!s.test(o.value))return;const n=e(o.value);n!==o.value&&(o.cloneBefore({value:n}),t.preserve||o.remove())}}};creator.postcss=!0;export{creator as default};