www_hero/node_modules/tailwindcss/lib/util/removeAlphaVariables.js
sasha-astiadi 324d5960af hero_web
2024-05-03 06:39:20 +02:00

19 lines
529 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.removeAlphaVariables = removeAlphaVariables;
function removeAlphaVariables(container, toRemove) {
container.walkDecls((decl)=>{
if (toRemove.includes(decl.prop)) {
decl.remove();
return;
}
for (let varName of toRemove){
if (decl.value.includes(`/ var(${varName})`)) {
decl.value = decl.value.replace(`/ var(${varName})`, "");
}
}
});
}