foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

Inliner v2 removes important whitespaces

Open needACoffee opened this issue 7 years ago • 1 comments

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.

needACoffee avatar Oct 23 '18 09:10 needACoffee

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.

DanielRuf avatar Dec 19 '19 06:12 DanielRuf