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.
Improved serialization of shadows AngleSharp#97
- Loading branch information
1 parent
35e0903
commit 91a7444
Showing
5 changed files
with
33 additions
and
10 deletions.
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
23 changes: 23 additions & 0 deletions
23
src/AngleSharp.Css.Tests/Declarations/CssTextShadowProperty.cs
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,23 @@ | ||
namespace AngleSharp.Css.Tests.Declarations | ||
{ | ||
using AngleSharp.Css.Dom; | ||
using AngleSharp.Css.Parser; | ||
using AngleSharp.Html.Parser; | ||
using NUnit.Framework; | ||
|
||
[TestFixture] | ||
public class CssTextShadowProperty | ||
{ | ||
[Test] | ||
public void ColorNotIncluded_Issue97() | ||
{ | ||
var html = @"<div style=""text-shadow: 2px 2px 2px #000"">test</div>"; | ||
var parser = new HtmlParser(new HtmlParserOptions(), BrowsingContext.New(Configuration.Default.WithCss(new CssParserOptions()))); | ||
var dom = parser.ParseDocument(html); | ||
var div = dom.QuerySelector("div"); | ||
var style = div.GetStyle(); | ||
var css = style.CssText; | ||
Assert.AreEqual("text-shadow: 2px 2px 2px rgba(0, 0, 0, 1)", 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
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