mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Ensure all CSS variables are in the output file
This commit is contained in:
parent
8cb212d897
commit
12543d2c2a
@ -89,27 +89,9 @@ while((match = ruleRegex.exec(colorsFile)) !== null) {
|
|||||||
const css = result.css.toString()
|
const css = result.css.toString()
|
||||||
const lines = css.split("\n");
|
const lines = css.split("\n");
|
||||||
const colorCSS = []
|
const colorCSS = []
|
||||||
const nonColorCSS = [];
|
|
||||||
|
|
||||||
let inKeyFrameBlock = false;
|
|
||||||
|
|
||||||
lines.forEach(l => {
|
lines.forEach(l => {
|
||||||
if (inKeyFrameBlock) {
|
colorCSS.push(l);
|
||||||
nonColorCSS.push(l);
|
|
||||||
if (/^}/.test(l)) {
|
|
||||||
inKeyFrameBlock = false;
|
|
||||||
}
|
|
||||||
} else if (/^@keyframes/.test(l)) {
|
|
||||||
nonColorCSS.push(l);
|
|
||||||
inKeyFrameBlock = true;
|
|
||||||
} else if (!/^ /.test(l)) {
|
|
||||||
colorCSS.push(l);
|
|
||||||
nonColorCSS.push(l);
|
|
||||||
} else if (/color|border|background|fill|stroke|outline|box-shadow/.test(l)) {
|
|
||||||
colorCSS.push(l);
|
|
||||||
} else {
|
|
||||||
nonColorCSS.push(l);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const nrPkg = require("../package.json");
|
const nrPkg = require("../package.json");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user