foundation-emails
foundation-emails copied to clipboard
Inliner v2 removes important whitespaces
How can we reproduce this bug?
Use Inliner v2 at https://foundation.zurb.com/emails/inliner-v2.html
Filled in HTML:
<body></body>
Filled in CSS:
body {background: linear-gradient(to bottom, white 33%, red 100%);}
Click the button 'Inline!'
What did you expect to happen? Output for the body-tag should be:
<body style="background: linear-gradient(to bottom, white 33%, red 100%);">
<style></style>
</body>
What happened instead? Output for the body tag is:
<body style="background: linear-gradient(tobottom,white33%,red100%);">
<style></style>
</body>
The Inliner has removed all whitespaces in linear-gradient(...). So this statement doesn't work anymore.
This is a bug in https://github.com/jonkemp/inline-css
See https://github.com/jonkemp/inline-css/issues/29
The latest version of html-minifier and html-minifier-terser directly use clean-css.
We will use this then.