Skip to content

Commit 1c60494

Browse files
Add test case for issue #410 to prove the need for additional logic
Co-Authored-By: m@martinnormark.com <m@martinnormark.com>
1 parent 5f1db61 commit 1c60494

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

PreMailer.Net/PreMailer.Net.Tests/PreMailerTests.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,23 @@ public void MoveCssInline_ImportantFlag_HonorsImportantFlagInline()
188188
Assert.Contains("<div style=\"color: red", premailedOutput.Html);
189189
}
190190

191+
[Fact]
192+
public void MoveCssInline_ImportantFlag_PreservesImportantInInlineStylesForDifferentProperties()
193+
{
194+
string input = @"<style>
195+
.test {
196+
color:red;
197+
}
198+
</style>
199+
<body>
200+
<p class=""test"" style=""font-weight: bold !important;"">test</p>
201+
</body>";
202+
203+
var premailedOutput = PreMailer.MoveCssInline(input);
204+
205+
Assert.Contains("font-weight: bold !important", premailedOutput.Html);
206+
}
207+
191208
[Fact]
192209
public void MoveCssInline_AbsoluteBackgroundUrl_ShouldNotBeCleanedAsComment()
193210
{

0 commit comments

Comments
 (0)