jonkemp/inline-css

should not remove spaces in calc() function

Closed this issue · 4 comments

Spaces are mandatory inside CSS calc() function, and should not be removed in inlining.

To reproduce:

const inlineCss = require('inline-css');
const html = `
  <style>
    div{width: calc(100% - 20px);}
  </style>
  <div/>
`;

inlineCss(html, {url: '/'}).then(function(html) { console.log(html); });
// => <div style="width: calc(100%-20px);"></div>

The issue is in this module:

https://github.com/NV/CSSOM

I've created an issue for this here.

NV/CSSOM#86

The issue in CCSOM was fixed so it should be available in their next release.

I'm closing this as it's been resolved in the latest release of the cssom module. If you update your dependencies, it should work. If it's not working, make sure you have cssom 0.3.2.