v1.0 with SW PWA enabled

This commit is contained in:
Blomios
2026-01-01 17:40:53 +01:00
parent 1c0e22aac1
commit 3c8bebb2ad
29775 changed files with 2197201 additions and 119080 deletions

View File

@ -33,9 +33,10 @@ function atRule(node) {
}
}
function process(node) {
function process(node, options = {}) {
let name
let result = {}
let { stringifyImportant } = options;
node.each(child => {
if (child.type === 'atrule') {
@ -52,7 +53,14 @@ function process(node) {
let body = process(child)
if (result[child.selector]) {
for (let i in body) {
result[child.selector][i] = body[i]
let object = result[child.selector];
if (stringifyImportant && object[i] && object[i].endsWith('!important')) {
if (body[i].endsWith('!important')) {
object[i] = body[i]
}
} else {
object[i] = body[i]
}
}
} else {
result[child.selector] = body