Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on rule "-webkit-text;" #478

Open
ValerioCietto opened this issue Jun 20, 2024 · 0 comments
Open

crash on rule "-webkit-text;" #478

ValerioCietto opened this issue Jun 20, 2024 · 0 comments

Comments

@ValerioCietto
Copy link

ValerioCietto commented Jun 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant