You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
529 B

2 years ago
"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})`, "");
}
}
});
}