email-builder-core icon indicating copy to clipboard operation
email-builder-core copied to clipboard

!important is not compiled into inline css

Open ligockym opened this issue 8 years ago • 1 comments

Hello, I think that I have found a bug in your module.

I have this css code: .button {color: #333 !important}

But it is compiled into: <div style="color: #333"></div>

The !important is missing in the compiled document. This can cause a problem in email-clients which use to make hyperlinks underlined by using !important.

ligockym avatar Feb 18 '17 14:02 ligockym

@ligockym You should be able to use the Juice option preserveImportant and set it to true

Example:

var options = {
  juice: {
    preserveImportant: true
  }
}
var emailBuilder = new EmailBuilder(options);

jeremypeter avatar Feb 20 '17 18:02 jeremypeter