juice
juice copied to clipboard
crash on rule "-webkit-text;"
Minimal example:
<html>
<head>
<style>
body {
margin: 0 auto !important;
padding: 0 !important;
width: 100% !important;
height: 100% !important;
-webkit-text;
size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
</style>
</head>
<body id="body" bgcolor="f5f5f5" style="margin: 0; padding: 0 !important;">
Test
</body>
</html>
By looking with debugger node_modules/juice/lib/inline.js:259
I can be solved with a try catch like
try {
// don't add css variables if we're resolving their values
if (options.resolveCSSVariables && (prop.prop.indexOf('--') === 0) ) {
return false;
}
} catch(error) {
console.error(error)
}
because it is a void CSS rule