From 812c49b67f3a66cd8a2c7c1de8619344bad2b432 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 18 Sep 2024 13:32:31 +0200 Subject: [PATCH] Temp --- Html.Net.Inline/Html.Net.Inline.csproj | 47 +++++++++++ Html.Net.Inline/InlineProcessor.cs | 91 +++++++++++++++++++++ Html.Net.Inline/icon.png | Bin 0 -> 6932 bytes Mjml.Net.Benchmark/TemplateBenchmarks.cs | 7 -- Mjml.Net.sln | 6 ++ Mjml.Net/AttributeTypes.cs | 2 + Mjml.Net/BindType.cs | 1 + Mjml.Net/Components/Head/StyleComponent.cs | 6 +- Mjml.Net/Components/IncludeComponent.cs | 7 +- Mjml.Net/Helpers/Style.cs | 20 ++++- Mjml.Net/IPostProcessor.cs | 6 ++ Mjml.Net/MjmlOptions.cs | 8 +- Mjml.Net/MjmlRenderer.cs | 12 ++- README.md | 7 +- Tests/Components/Outputs/StyleInclude.html | 6 +- Tests/Components/Outputs/StyleInline.html | 23 ++++++ Tests/Components/Outputs/StyleInlined.html | 19 +++++ Tests/Components/StyleTests.cs | 56 ++++++++++++- Tests/Components/TextTests.cs | 1 - Tests/Tests.csproj | 7 +- 20 files changed, 306 insertions(+), 26 deletions(-) create mode 100644 Html.Net.Inline/Html.Net.Inline.csproj create mode 100644 Html.Net.Inline/InlineProcessor.cs create mode 100644 Html.Net.Inline/icon.png create mode 100644 Mjml.Net/IPostProcessor.cs create mode 100644 Tests/Components/Outputs/StyleInline.html create mode 100644 Tests/Components/Outputs/StyleInlined.html diff --git a/Html.Net.Inline/Html.Net.Inline.csproj b/Html.Net.Inline/Html.Net.Inline.csproj new file mode 100644 index 0000000..7edbb93 --- /dev/null +++ b/Html.Net.Inline/Html.Net.Inline.csproj @@ -0,0 +1,47 @@ + + + + net6.0;net7.0;net8.0 + enable + enable + true + true + 1591 + en + latest + Mjml.Net + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + True + + + + + + + + + + + diff --git a/Html.Net.Inline/InlineProcessor.cs b/Html.Net.Inline/InlineProcessor.cs new file mode 100644 index 0000000..923eb78 --- /dev/null +++ b/Html.Net.Inline/InlineProcessor.cs @@ -0,0 +1,91 @@ +using AngleSharp; +using AngleSharp.Dom; +using Mjml.Net; + +namespace Html.Net; + +public sealed class InlineProcessor : IPostProcessor +{ + public static readonly InlineProcessor Instance = new InlineProcessor(); + + private InlineProcessor() + { + } + + public string PostProcess(string html, MjmlOptions options) + { + var config = Configuration.Default.WithCss(); + var context = BrowsingContext.New(config); + + var document = context.OpenAsync(req => req.Content(html)).Result; + + Traverse(document, a => RenameNonInline(a, document)); + Traverse(document, InlineStyle); + Traverse(document, a => RestoreNonInline(a, document)); + + return document.ToString()!; + } + + private static void Traverse(INode node, Action action) + { + foreach (var child in node.ChildNodes.ToList()) + { + Traverse(child, action); + } + + if (node is IElement element) + { + action(element); + } + } + + private static void InlineStyle(IElement element) + { + var currentStyle = element.ComputeCurrentStyle(); + + if (currentStyle.Any()) + { + var css = currentStyle.ToCss(); + + element.SetAttribute("style", css); + } + } + + private static void RenameNonInline(IElement element, IDocument document) + { + if (string.Equals(element.TagName, "style", StringComparison.OrdinalIgnoreCase) && !element.HasAttribute("inline")) + { + RenameTag(element, "non_inline_style", document); + } + } + + private static void RestoreNonInline(IElement element, IDocument document) + { + if (string.Equals(element.TagName, "non_inline_style", StringComparison.OrdinalIgnoreCase)) + { + RenameTag(element, "non_inline_style", document); + } + + if (string.Equals(element.TagName, "style", StringComparison.OrdinalIgnoreCase) && element.HasAttribute("inline")) + { + element.Remove(); + } + } + + private static void RenameTag(IElement node, string tagName, IDocument document) + { + var clone = document.CreateElement(tagName); + + foreach (var attribute in node.Attributes) + { + clone.SetAttribute(attribute.NamespaceUri, attribute.Name, attribute.Value); + } + + var parent = node.Parent!; + + clone.InnerHtml = node.InnerHtml; + + parent.InsertBefore(clone, node); + parent.RemoveChild(node); + } +} diff --git a/Html.Net.Inline/icon.png b/Html.Net.Inline/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6b67ea790df40faef0c695d8fe0a5f11d90906d7 GIT binary patch literal 6932 zcmb7Jc{tQ-8y+J2QbO5f3n4p2NU}!Rw?SDV*&55(mlB~YVM3@-QTAnGFl9-@AS62( z8Chn=*v2}(pH5fj>U`&X*ZEx6_~ZS(@AE$I^Dg&u-_QLk#=1=OT=XCih)G}XqA3VO zk#g{(Jq)x&A(hY|5Z9RgMJ;ov18yQH-NiMlgE%*7!22Tfc*>bps!Ocj=@_+G`@rlX zOsXtT1!9h?hA`5;Har|4%M;K#5}*?udo@#s(dGSmRKizABT@V}bYb2+eu18Z4<~#l z6Pd?u;LRp1;FH@CJ;ACs^56}NO>W%XC5_Qid){*zd0kX{n|zcmbuQLuV`2$Z(Eec(MMqT>H{>zD7C_3#7) zkrI^Ve6Ya#mI7kcloTN05A^>PpI$kaNK$_A2uzih_k|wjKPlGhCA1vq3(*td?%KIS8 z3ba$vUY~r`mzFE1Ek|R*7P&-4BuzLLUSTaSZH*8Q)V5yYJi(LhG*R-_!V!EbqkUC) zys|sOV`i(_g=HxfEjZAgzq|p(H_3)3z8k+w1HK1<`7%9-(0(d&ty zZqlZ3z;emPC}iXdmlu5EX{h0e)K+kC}NG`myB>h>dVmIJK99Y)RlDFXAiO?f(c zAh$z^qF*cl> zsWhqikqG2UGT2zSdfx@rtu`e+1SZ$mq-C8Mk#0Rg72irf2kt3u=suNQUB^&f@%sKT zH*o4h2JHe_#-RlI`59!pw^a6_?xpj~V*IDwjmh7%h2>|L!PtNxTP&}c$bh^MS>3}a zupmozWTsFt5^(brB=o3)GL8qEtkEs4Xm4CErKe2Ursbe(6_zZi0AISM+X2bCs~VsL z*+eYeZgovo%Nz*dy%?qPaoobH$_A0-#@2mpZal1OWcHps+!)2z|5m=` zj2ta1O_p6%D-)JuQC~PbT-`N@p9cR~`B#$cV5+*@0|$C8ggLl`~GTPlYYltLoo$-6>8_^JeHz1_8~VZX7f>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uQQ(-KTzr>KQPdxWU_}tzp-eT zj+&gexjn$bMjR?0U9F)VDkL~nfNc|fPYYXf7A>bndTq>@6^2gyQKR|%l^Hv z@XJ!WT_ibnyb~a*KP7Im8X#Ezwczlp`|mpY-`JeohSX=B1PQ4AE_)x;1pcC9+eP9} zmmLCheQc@FK@PIiLityHzA@kigq8RIX5hbj3tjBNc>i||@RmQ zrLLSD|16y!EF=NGVPrf*4HEA7*Ar~vE;z;f2d*DE#{d8T literal 0 HcmV?d00001 diff --git a/Mjml.Net.Benchmark/TemplateBenchmarks.cs b/Mjml.Net.Benchmark/TemplateBenchmarks.cs index d313489..b8c713d 100644 --- a/Mjml.Net.Benchmark/TemplateBenchmarks.cs +++ b/Mjml.Net.Benchmark/TemplateBenchmarks.cs @@ -10,7 +10,6 @@ namespace Mjml.Net.Benchmarking; public class TemplateBenchmarks { private static readonly MjmlOptions WithBeautify = new MjmlOptions { Beautify = true }; - private static readonly MjmlOptions WithMinify = new MjmlOptions { Minify = true }; private readonly MjmlRenderer MjmlRenderer; [ParamsSource(nameof(MjmlTemplates))] @@ -61,10 +60,4 @@ public string Render_Template_Beautify() { return MjmlRenderer.Render(MjmlTemplate, WithBeautify).Html; } - - [Benchmark] - public string Render_Template_Minify() - { - return MjmlRenderer.Render(MjmlTemplate, WithMinify).Html; - } } diff --git a/Mjml.Net.sln b/Mjml.Net.sln index e86ca80..3e3d233 100644 --- a/Mjml.Net.sln +++ b/Mjml.Net.sln @@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tools", "Tools\Tools.csproj EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mjml.Net.Benchmark", "Mjml.Net.Benchmark\Mjml.Net.Benchmark.csproj", "{3969326A-B528-4120-8E30-4127F66B638E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Html.Net.Inline", "Html.Net.Inline\Html.Net.Inline.csproj", "{BADECB72-90D2-44F3-AA93-27B0247C8FA9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +41,10 @@ Global {3969326A-B528-4120-8E30-4127F66B638E}.Debug|Any CPU.Build.0 = Debug|Any CPU {3969326A-B528-4120-8E30-4127F66B638E}.Release|Any CPU.ActiveCfg = Release|Any CPU {3969326A-B528-4120-8E30-4127F66B638E}.Release|Any CPU.Build.0 = Release|Any CPU + {BADECB72-90D2-44F3-AA93-27B0247C8FA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BADECB72-90D2-44F3-AA93-27B0247C8FA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BADECB72-90D2-44F3-AA93-27B0247C8FA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BADECB72-90D2-44F3-AA93-27B0247C8FA9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Mjml.Net/AttributeTypes.cs b/Mjml.Net/AttributeTypes.cs index 2d7d853..735aa23 100644 --- a/Mjml.Net/AttributeTypes.cs +++ b/Mjml.Net/AttributeTypes.cs @@ -18,6 +18,8 @@ public static class AttributeTypes public static readonly IType IncludeType = new EnumType(true, "mjml", "html", "css"); + public static readonly IType Inline = new EnumType(true, "inline"); + public static readonly IType Pixels = new NumberType(Unit.Pixels); public static readonly IType PixelsOrAuto = new OneOfType(new EnumType(false, "auto"), Pixels); diff --git a/Mjml.Net/BindType.cs b/Mjml.Net/BindType.cs index 8a0507a..ad95a6e 100644 --- a/Mjml.Net/BindType.cs +++ b/Mjml.Net/BindType.cs @@ -10,6 +10,7 @@ public enum BindType File, FourPixelsOrPercent, LeftRight, + Inline, Pixels, PixelsOrAuto, PixelsOrEm, diff --git a/Mjml.Net/Components/Head/StyleComponent.cs b/Mjml.Net/Components/Head/StyleComponent.cs index 75fa594..12370fc 100644 --- a/Mjml.Net/Components/Head/StyleComponent.cs +++ b/Mjml.Net/Components/Head/StyleComponent.cs @@ -8,7 +8,7 @@ public partial class StyleComponent : HeadComponentBase public override string ComponentName => "mj-style"; - [Bind("inline")] + [Bind("inline", BindType.Inline)] public string? Inline; [BindText] @@ -19,7 +19,9 @@ public override void Render(IHtmlRenderer renderer, GlobalContext context) // Just in case that validation is disabled. if (Text != null) { - var style = Style.Static(Text); + var isInline = string.Equals(Inline, "inline", StringComparison.OrdinalIgnoreCase); + + var style = Style.Static(Text, isInline); // Allow multiple styles. context.AddGlobalData(style); diff --git a/Mjml.Net/Components/IncludeComponent.cs b/Mjml.Net/Components/IncludeComponent.cs index 785c438..4605075 100644 --- a/Mjml.Net/Components/IncludeComponent.cs +++ b/Mjml.Net/Components/IncludeComponent.cs @@ -14,6 +14,9 @@ public sealed partial class IncludeComponent : Component [Bind("path", BindType.RequiredString)] public string Path; + [Bind("css-inline", BindType.Inline)] + public string? CssInline; + [Bind("type", typeof(TypeValidator))] public string Type; @@ -153,8 +156,10 @@ public override void Render(IHtmlRenderer renderer, GlobalContext context) } else if (ActualType == IncludeType.Css) { + var isInline = string.Equals(CssInline, "inline", StringComparison.OrdinalIgnoreCase); + // Allow multiple styles and render them later. - context.AddGlobalData(Style.Static(new InnerTextOrHtml(content))); + context.AddGlobalData(Style.Static(new InnerTextOrHtml(content), isInline)); } } diff --git a/Mjml.Net/Helpers/Style.cs b/Mjml.Net/Helpers/Style.cs index d8e8a56..526ee0f 100644 --- a/Mjml.Net/Helpers/Style.cs +++ b/Mjml.Net/Helpers/Style.cs @@ -2,11 +2,11 @@ namespace Mjml.Net.Helpers; -public sealed record Style(Action Renderer) : GlobalData +public sealed record Style(Action Renderer, bool Inline = false) : GlobalData { - public static Style Static(InnerTextOrHtml text) + public static Style Static(InnerTextOrHtml text, bool inline) { - return new Style((renderer, _) => renderer.Content(text)); + return new Style((renderer, _) => renderer.Content(text), inline); } } @@ -65,11 +65,23 @@ private static void WriteMediaQueriesThunderbird(IHtmlRenderer renderer, GlobalC } private static void WriteStyles(IHtmlRenderer renderer, GlobalContext context) + { + WriteStyles(renderer, context, context.GlobalData.Values.OfType \ No newline at end of file + + +
+
+
\ No newline at end of file diff --git a/Tests/Components/Outputs/StyleInline.html b/Tests/Components/Outputs/StyleInline.html new file mode 100644 index 0000000..e99c7db --- /dev/null +++ b/Tests/Components/Outputs/StyleInline.html @@ -0,0 +1,23 @@ + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/Tests/Components/Outputs/StyleInlined.html b/Tests/Components/Outputs/StyleInlined.html new file mode 100644 index 0000000..1cd2522 --- /dev/null +++ b/Tests/Components/Outputs/StyleInlined.html @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/Tests/Components/StyleTests.cs b/Tests/Components/StyleTests.cs index f109ae0..202f5ab 100644 --- a/Tests/Components/StyleTests.cs +++ b/Tests/Components/StyleTests.cs @@ -1,4 +1,6 @@ -using Mjml.Net.Helpers; +using Html.Net; +using Mjml.Net; +using Mjml.Net.Helpers; using Tests.Internal; using Xunit; @@ -10,7 +12,7 @@ public class StyleTests public void Should_render_style() { var source = @" - + .red-text div { @@ -19,6 +21,11 @@ public void Should_render_style() + +
+
+
+
"; @@ -32,7 +39,7 @@ public void Should_render_style() public void Should_render_inline_just_normal_as_fallback() { var source = @" - + .red-text div { @@ -41,12 +48,53 @@ public void Should_render_inline_just_normal_as_fallback() + +
+
+
+
"; var result = TestHelper.Render(source, new StyleHelper()); - AssertHelpers.HtmlFileAssert("Components.Outputs.Style.html", result); + AssertHelpers.HtmlFileAssert("Components.Outputs.StyleInline.html", result); + } + + [Fact] + public void Should_render_inline() + { + var source = @" + + + + .red-text div { + color: red !important; + } + + + + +
+
+
+
+
+
+"; + + var options = new MjmlOptions + { + PostProcessors = + [ + InlineProcessor.Instance + ], + Beautify = true + }; + + var result = TestHelper.Render(source, options, new StyleHelper()); + + AssertHelpers.HtmlFileAssert("Components.Outputs.StyleInlined.html", result); } } diff --git a/Tests/Components/TextTests.cs b/Tests/Components/TextTests.cs index 9ff541f..e8b8ea1 100644 --- a/Tests/Components/TextTests.cs +++ b/Tests/Components/TextTests.cs @@ -78,7 +78,6 @@ public void Should_render_text_with_html_and_whitespace() var result = renderer.Render(source, new MjmlOptions() { - Minify = true, Beautify = false, }).Html; diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 480155f..b8763d4 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -44,6 +44,8 @@ + + @@ -53,7 +55,7 @@ - + @@ -76,6 +78,7 @@ + @@ -103,6 +106,8 @@ + +