optimizations, WIP theme selector
This commit is contained in:
parent
9d76fcc425
commit
40c9163d21
12 changed files with 361 additions and 158 deletions
|
|
@ -159,3 +159,15 @@ export const getCssRules = (rules, debug) => rules.map(rule => {
|
|||
footer
|
||||
].join('\n')
|
||||
}).filter(x => x)
|
||||
|
||||
export const getScopedVersion = (rules, newScope) => {
|
||||
return rules.map(x => {
|
||||
if (x.startsWith('html')) {
|
||||
return x.replace('html', newScope)
|
||||
} else if (x.startsWith('#content')) {
|
||||
return x.replace('#content', newScope)
|
||||
} else {
|
||||
return newScope + ' > ' + x
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue