1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | "use strict";
|
10 | Object.defineProperty(exports, "__esModule", {
|
11 | value: true
|
12 | });
|
13 | Object.defineProperty(exports, "removeAlphaVariables", {
|
14 | enumerable: true,
|
15 | get: ()=>removeAlphaVariables
|
16 | });
|
17 | function removeAlphaVariables(container, toRemove) {
|
18 | container.walkDecls((decl)=>{
|
19 | if (toRemove.includes(decl.prop)) {
|
20 | decl.remove();
|
21 | return;
|
22 | }
|
23 | for (let varName of toRemove){
|
24 | if (decl.value.includes(`/ var(${varName})`)) {
|
25 | decl.value = decl.value.replace(`/ var(${varName})`, "");
|
26 | }
|
27 | }
|
28 | });
|
29 | }
|