forked from AngleSharp/AngleSharp.Css
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed missing semicolon separator AngleSharp#135
- Loading branch information
1 parent
b9aef4c
commit 6905fa5
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
namespace AngleSharp.Css.Tests.Rules | ||
{ | ||
using AngleSharp.Css.Dom; | ||
using NUnit.Framework; | ||
using System.Linq; | ||
|
||
[TestFixture] | ||
public class CssPageRuleTests | ||
{ | ||
[Test] | ||
public void SemiColonsShouldNotMissInPageRule_Issue135() | ||
{ | ||
var html = "<html><body><style>@page { margin-top: 25mm; margin-right: 25mm }</style></body></html>"; | ||
var document = html.ToHtmlDocument(Configuration.Default.WithCss()); | ||
var styleSheet = document.StyleSheets.OfType<ICssStyleSheet>().First(); | ||
var css = styleSheet.ToCss(); | ||
|
||
Assert.AreEqual("@page { margin-top: 25mm; margin-right: 25mm }", css); | ||
} | ||
|
||
[Test] | ||
public void PageRuleShouldRecombineShorthandDeclaration_Issue135() | ||
{ | ||
var html = "<html><body><style>@page { margin: 25mm }</style></body></html>"; | ||
var document = html.ToHtmlDocument(Configuration.Default.WithCss()); | ||
var styleSheet = document.StyleSheets.OfType<ICssStyleSheet>().First(); | ||
var css = styleSheet.ToCss(); | ||
|
||
Assert.AreEqual("@page { margin: 25mm }", css); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters