Skip to content

Commit

Permalink
Normalize with new line
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Apr 22, 2021
1 parent 3e2f598 commit b2cb760
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/AngleSharp.Css.Tests/Styling/CssSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void CssSheetSerializeBackgroundWithUrlPositionRepeatX()
[Test]
public void CssSheetIgnoreVendorPrefixes()
{
var css = @".something {
var css = @".something {
-o-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
Expand Down Expand Up @@ -540,7 +540,7 @@ public void CssMarginAll()
Assert.AreEqual(names[i], decl.Name);
Assert.AreEqual(propertyName, decl.Name);
Assert.IsFalse(decl.IsImportant);
Assert.AreEqual("20px", decl.Value);
Assert.AreEqual("20px", decl.Value);
}
}

Expand Down Expand Up @@ -859,7 +859,7 @@ public void CssParseMsViewPortWithUnknownRules()
var css = "@-ms-viewport{width:device-width} .dsip { display: block; }";
var doc = ParseStyleSheet(css, options);
var result = doc.ToCss();
Assert.AreEqual("@-ms-viewport{width:device-width}\r\n.dsip { display: block }", result);
Assert.AreEqual("@-ms-viewport{width:device-width}" + Environment.NewLine + ".dsip { display: block }", result);
}

[Test]
Expand All @@ -868,7 +868,7 @@ public void CssParseMediaAndMsViewPortWithoutOptions()
var css = "@media screen and (max-width: 400px) { @-ms-viewport { width: 320px; } } .dsip { display: block; }";
var doc = ParseStyleSheet(css);
var result = doc.ToCss();
Assert.AreEqual("@media screen and (max-width: 400px) { }\r\n.dsip { display: block }", result);
Assert.AreEqual("@media screen and (max-width: 400px) { }" + Environment.NewLine + ".dsip { display: block }", result);
}

[Test]
Expand All @@ -882,18 +882,18 @@ public void CssParseMediaAndMsViewPortWithUnknownRules()
var css = "@media screen and (max-width: 400px) { @-ms-viewport { width: 320px; } } .dsip { display: block; }";
var doc = ParseStyleSheet(css, options);
var result = doc.ToCss();
Assert.AreEqual("@media screen and (max-width: 400px) { @-ms-viewport { width: 320px; } }\r\n.dsip { display: block }", result);
Assert.AreEqual("@media screen and (max-width: 400px) { @-ms-viewport { width: 320px; } }" + Environment.NewLine + ".dsip { display: block }", result);
}

[Test]
public void CssStyleSheetInsertAndDeleteShouldWork()
{
var s = ParseStyleSheet(String.Empty);
Assert.AreEqual(0, s.Rules.Length);

s.Insert("a {color: blue}", 0);
Assert.AreEqual(1, s.Rules.Length);

s.Insert("a *:first-child, a img {border: none}", 1);
Assert.AreEqual(2, s.Rules.Length);

Expand Down

0 comments on commit b2cb760

Please sign in to comment.