summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-content-alt-text/dist/index.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@csstools/postcss-content-alt-text/dist/index.mjs')
-rw-r--r--node_modules/@csstools/postcss-content-alt-text/dist/index.mjs1
1 files changed, 0 insertions, 1 deletions
diff --git a/node_modules/@csstools/postcss-content-alt-text/dist/index.mjs b/node_modules/@csstools/postcss-content-alt-text/dist/index.mjs
deleted file mode 100644
index 0b488d05..00000000
--- a/node_modules/@csstools/postcss-content-alt-text/dist/index.mjs
+++ /dev/null
@@ -1 +0,0 @@
-import{parseListOfComponentValues as s,isTokenNode as e,stringify as t}from"@csstools/css-parser-algorithms";import{tokenize as o,isTokenDelim as r}from"@csstools/css-tokenizer";import n from"@csstools/postcss-progressive-custom-properties";import{hasFallback as c,hasSupportsAtRuleAncestor as i}from"@csstools/utilities";const l={test:s=>s.includes("content:")&&s.includes("/")},basePlugin=n=>({postcssPlugin:"postcss-content-alt-text",Declaration(p){if("content"!==p.prop||!p.value.includes("/"))return;if(c(p))return;if(i(p,l))return;const u=s(o({css:p.value}));let a=0;for(let s=u.length-1;s>=0;s--){const t=u[s];if(!e(t))continue;const o=t.value;r(o)&&("/"===o[4].value&&(a++,!0===n?.stripAltText?u.splice(s,u.length):u.splice(s,1)))}if(1!==a)return;const m=t([u]);m!==p.value&&(p.cloneBefore({value:m}),!1===n?.preserve&&p.remove())}});basePlugin.postcss=!0;const creator=s=>{const e=Object.assign({enableProgressiveCustomProperties:!0,preserve:!0,stripAltText:!1},s);return e.enableProgressiveCustomProperties&&e.preserve?{postcssPlugin:"postcss-content-alt-text",plugins:[n(),basePlugin(e)]}:basePlugin(e)};creator.postcss=!0;export{creator as default};