jonkemp / inline-css

Inline css into an html file.
MIT License
429 stars 84 forks source link

Css variables won't parsed #125

Open NV4RE opened 1 year ago

NV4RE commented 1 year ago

Hello, it seem css variable not supported in most email client, and it should be replace by inliner before sent.

input

/* style.css */
.bg-gray-100{
  --tw-bg-opacity:1;
  background-color:rgb(237 242 247/var(--tw-bg-opacity));
}
<!-- index.html -->
<link href="style.css" rel="stylesheet" />
<div class="bg-gray-100">
  Hello there
</div>

output

<div class="bg-gray-100" style="--tw-bg-opacity: 1; background-color: rgb(237 242 247/var(--tw-bg-opacity));">
  Hello there
</div>

expected

<div style="--tw-bg-opacity: 1; background-color: rgb(237 242 247/1);">
  Hello there
</div>