summaryrefslogtreecommitdiff
path: root/node_modules/postcss-overflow-shorthand/dist/index.cjs
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/postcss-overflow-shorthand/dist/index.cjs')
-rw-r--r--node_modules/postcss-overflow-shorthand/dist/index.cjs1
1 files changed, 1 insertions, 0 deletions
diff --git a/node_modules/postcss-overflow-shorthand/dist/index.cjs b/node_modules/postcss-overflow-shorthand/dist/index.cjs
new file mode 100644
index 00000000..da4166a2
--- /dev/null
+++ b/node_modules/postcss-overflow-shorthand/dist/index.cjs
@@ -0,0 +1 @@
+"use strict";var e=require("postcss-value-parser");const creator=r=>{const o=Object.assign({preserve:!0},r);return{postcssPlugin:"postcss-overflow-shorthand",Declaration:(r,{result:s})=>{if("overflow"!==r.prop.toLowerCase())return;let t="",a="";const l=r.value;try{const r=e(l).nodes.slice().filter((e=>"comment"!==e.type&&"space"!==e.type));if(r.length<2)return;t=e.stringify(r[0]),a=e.stringify(r[1])}catch(e){return void r.warn(s,`Failed to parse value '${l}' as a shorthand for "overflow". Leaving the original value intact.`)}t&&a&&(t.toLowerCase()===a.toLowerCase()?r.cloneBefore({value:t}):(r.cloneBefore({prop:"overflow-x",value:t}),r.cloneBefore({prop:"overflow-y",value:a})),o.preserve||r.remove())}}};creator.postcss=!0,module.exports=creator;