Skip to content

Commit 3b0ea89

Browse files
Test
1 parent 4c9f16a commit 3b0ea89

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/AngleSharp.Css.Tests/Extensions/Nesting.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ public void SimpleSelectorNestingImplicitDeclarations()
4343
Assert.AreEqual("1.4rem", style.GetFontSize());
4444
}
4545

46+
[Test]
47+
public void SimpleSelectorNestingImplicitDeclarationsWordBreak()
48+
{
49+
var source = @"<!doctype html><head><style>.foo {
50+
color: green;
51+
.bar {
52+
word-break: break-word;
53+
}
54+
}</style></head><body class='foo'><div class='bar'>Larger and green";
55+
var document = ParseDocument(source);
56+
var window = document.DefaultView;
57+
var element = document.QuerySelector(".bar");
58+
var styleCollection = window.GetStyleCollection();
59+
var style = styleCollection.GetDeclarations(element);
60+
61+
Assert.AreEqual("break-word", style.GetWordBreak());
62+
}
63+
4664
[Test]
4765
public void SimpleSelectorNestingExplicit()
4866
{

0 commit comments

Comments
 (0)