don't add usercss vars to empty sections
This commit is contained in:
parent
fb3554a351
commit
0e518bddcb
|
@ -1,4 +1,4 @@
|
|||
/* global loadScript mozParser semverCompare colorParser */
|
||||
/* global loadScript mozParser semverCompare colorParser styleCodeEmpty */
|
||||
'use strict';
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
|
@ -30,11 +30,12 @@ var usercss = (() => {
|
|||
':root {\n' +
|
||||
Object.keys(vars).map(k => ` --${k}: ${vars[k].value};\n`).join('') +
|
||||
'}\n';
|
||||
|
||||
for (const section of sections) {
|
||||
if (!styleCodeEmpty(section.code)) {
|
||||
section.code = varDef + section.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
stylus: {
|
||||
preprocess(source, vars) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user