mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
support css variables in sanitize
This commit is contained in:
@@ -23,6 +23,9 @@ const addStyles = (output: string[], styles: CSSStyleDeclaration) => {
|
|||||||
} else if (typeof value === 'number') {
|
} else if (typeof value === 'number') {
|
||||||
output.push(`${key}:${value}${priorityString};`);
|
output.push(`${key}:${value}${priorityString};`);
|
||||||
}
|
}
|
||||||
|
} else if (styles.getPropertyValue(key)) {
|
||||||
|
// These will not override the value unless not declared !important
|
||||||
|
output.push(`${key}: ${styles.getPropertyValue(key)} !important;`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user