mjml-net icon indicating copy to clipboard operation
mjml-net copied to clipboard

InlineCssPostProcessor overwrites default tag styles

Open TwentyFourMinutes opened this issue 1 year ago • 10 comments

Since v4 the new InlineCssPostProcessor causes the default styles defined by mjml-net to be overwritten. I believe its caused on this line: https://github.com/SebastianStehle/mjml-net/blob/4aa0c64f46df824c0e96fc19232c690e9cdc780a/Mjml.Net.PostProcessors/InlineCssPostProcessor.cs#L37

From what I can tell this more or less ignores all styles defined on the style= attribute. For example calling element.GetAttribute(TagNames.Style) will correctly return me word-break:break-word. Otherwise with the current implementation the whole InlineCssPostProcessor causes the whole HTML to be more or less broken.

Would be awesome if you could take a look at it :). Also thanks for maintaining this library, it's awesome!

TwentyFourMinutes avatar Sep 24 '24 06:09 TwentyFourMinutes