www_hero/node_modules/tailwindcss/lib/util/removeAlphaVariables.js

19 lines
529 B
JavaScript
Raw Normal View History

2024-05-03 04:39:20 +00:00
"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})`, "");
}
}
});
}