diff --git a/lib/css_inline.ex b/lib/css_inline.ex index 34cfdca..de73494 100644 --- a/lib/css_inline.ex +++ b/lib/css_inline.ex @@ -31,6 +31,10 @@ defmodule CSSInline do * `:load_remote_stylesheets` - Whether to load remote stylesheets referenced in `` tags. Defaults to `true`. Set to `false` to skip external stylesheets. * `:minify_css` - Whether to minify the inlined CSS. Defaults to `true`. + * `:remove_inlined_selectors` - Whether to remove selectors from ` + + + +
+ Click Me +
+
+ + + """ + + test "preserves !important when inlining styles" do + assert {:ok, result} = CSSInline.inline(@email_html) + assert result =~ ~r/style="[^"]*!important/ + end + + @production_opts [ + load_remote_stylesheets: false, + keep_link_tags: true, + keep_style_tags: true + ] + + test "production settings: inlined selectors remain in