mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Give function better name
This commit is contained in:
parent
0a186dd11b
commit
b7a47ae901
@ -24,7 +24,7 @@ let counter;
|
|||||||
let urlVariables;
|
let urlVariables;
|
||||||
const idToPrepend = "icon-url";
|
const idToPrepend = "icon-url";
|
||||||
|
|
||||||
function extractUrl(decl) {
|
function findAndReplaceUrl(decl) {
|
||||||
const value = decl.value;
|
const value = decl.value;
|
||||||
const parsed = valueParser(value);
|
const parsed = valueParser(value);
|
||||||
parsed.walk(node => {
|
parsed.walk(node => {
|
||||||
@ -60,7 +60,7 @@ module.exports = (opts = {}) => {
|
|||||||
postcssPlugin: "postcss-url-to-variable",
|
postcssPlugin: "postcss-url-to-variable",
|
||||||
|
|
||||||
Once(root, { Rule, Declaration }) {
|
Once(root, { Rule, Declaration }) {
|
||||||
root.walkDecls(decl => extractUrl(decl));
|
root.walkDecls(decl => findAndReplaceUrl(decl));
|
||||||
addResolvedVariablesToRootSelector(root, { Rule, Declaration });
|
addResolvedVariablesToRootSelector(root, { Rule, Declaration });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user