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.
Merge pull request AngleSharp#87 from jogibear9988/fix86
bugfix AngleSharp#86 - box-sizing not parsed
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/AngleSharp.Css.Tests/Declarations/CssBoxSizingProperty.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,21 @@ | ||
namespace AngleSharp.Css.Tests.Declarations | ||
{ | ||
using NUnit.Framework; | ||
using static CssConstructionFunctions; | ||
|
||
[TestFixture] | ||
public class CssBoxSizingPropertyTests | ||
{ | ||
[Test] | ||
public void TestBoxSizing() | ||
{ | ||
var source = "* { box-sizing: border-box; }"; | ||
var css = ParseStyleSheet(source); | ||
var text = css.Rules[0].CssText; | ||
|
||
var expected = "* { box-sizing: border-box }"; | ||
Assert.AreEqual(expected, text); | ||
} | ||
} | ||
} | ||
|
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,17 @@ | ||
namespace AngleSharp.Css.Declarations | ||
{ | ||
using AngleSharp.Css.Dom; | ||
using System; | ||
using static ValueConverters; | ||
|
||
static class BoxSizingDeclaration | ||
{ | ||
public static String Name = PropertyNames.BoxSizing; | ||
|
||
public static IValueConverter Converter = BoxModelConverter; | ||
|
||
public static ICssValue InitialValue = InitialValues.BoxSizingDecl; | ||
|
||
public static PropertyFlags Flags = PropertyFlags.Animatable; | ||
} | ||
} |
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