summaryrefslogtreecommitdiff
path: root/node_modules/postcss-overflow-shorthand/dist
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:05:55 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:05:55 +0800
commitc06f7ee0a40255214c477e13d9b956a7e07c2900 (patch)
treef5982a568ef8fab865d0142e71c7494fea3e4c1b /node_modules/postcss-overflow-shorthand/dist
parent3fd9400d4dccc25aa29b5702216732e0b7542073 (diff)
postcss,(plugins): nanocss, postcss-preset-env
Diffstat (limited to 'node_modules/postcss-overflow-shorthand/dist')
-rw-r--r--node_modules/postcss-overflow-shorthand/dist/index.cjs1
-rw-r--r--node_modules/postcss-overflow-shorthand/dist/index.d.ts8
-rw-r--r--node_modules/postcss-overflow-shorthand/dist/index.mjs1
3 files changed, 10 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;
diff --git a/node_modules/postcss-overflow-shorthand/dist/index.d.ts b/node_modules/postcss-overflow-shorthand/dist/index.d.ts
new file mode 100644
index 00000000..017c3aad
--- /dev/null
+++ b/node_modules/postcss-overflow-shorthand/dist/index.d.ts
@@ -0,0 +1,8 @@
+import type { PluginCreator } from 'postcss';
+/** postcss-overflow-shorthand plugin options */
+export type pluginOptions = {
+ /** Preserve the original notation. default: true */
+ preserve?: boolean;
+};
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
diff --git a/node_modules/postcss-overflow-shorthand/dist/index.mjs b/node_modules/postcss-overflow-shorthand/dist/index.mjs
new file mode 100644
index 00000000..426c0a0c
--- /dev/null
+++ b/node_modules/postcss-overflow-shorthand/dist/index.mjs
@@ -0,0 +1 @@
+import e from"postcss-value-parser";const creator=o=>{const r=Object.assign({preserve:!0},o);return{postcssPlugin:"postcss-overflow-shorthand",Declaration:(o,{result:t})=>{if("overflow"!==o.prop.toLowerCase())return;let s="",a="";const l=o.value;try{const o=e(l).nodes.slice().filter((e=>"comment"!==e.type&&"space"!==e.type));if(o.length<2)return;s=e.stringify(o[0]),a=e.stringify(o[1])}catch(e){return void o.warn(t,`Failed to parse value '${l}' as a shorthand for "overflow". Leaving the original value intact.`)}s&&a&&(s.toLowerCase()===a.toLowerCase()?o.cloneBefore({value:s}):(o.cloneBefore({prop:"overflow-x",value:s}),o.cloneBefore({prop:"overflow-y",value:a})),r.preserve||o.remove())}}};creator.postcss=!0;export{creator as default};