File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
AngleSharp.Css.Tests/Declarations Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace AngleSharp . Css . Tests . Declarations
2
+ {
3
+ using NUnit . Framework ;
4
+ using static CssConstructionFunctions ;
5
+
6
+ [ TestFixture ]
7
+ public class CssBoxSizingPropertyTests
8
+ {
9
+ [ Test ]
10
+ public void TestBoxSizing ( )
11
+ {
12
+ var source = "* { box-sizing: border-box; }" ;
13
+ var css = ParseStyleSheet ( source ) ;
14
+ var text = css . Rules [ 0 ] . CssText ;
15
+
16
+ var expected = "* { box-sizing: border-box }" ;
17
+ Assert . AreEqual ( expected , text ) ;
18
+ }
19
+ }
20
+ }
21
+
Original file line number Diff line number Diff line change
1
+ namespace AngleSharp . Css . Declarations
2
+ {
3
+ using AngleSharp . Css . Dom ;
4
+ using System ;
5
+ using static ValueConverters ;
6
+
7
+ static class BoxSizingDeclaration
8
+ {
9
+ public static String Name = PropertyNames . BoxSizing ;
10
+
11
+ public static IValueConverter Converter = BoxModelConverter ;
12
+
13
+ public static ICssValue InitialValue = InitialValues . BoxSizingDecl ;
14
+
15
+ public static PropertyFlags Flags = PropertyFlags . Animatable ;
16
+ }
17
+ }
Original file line number Diff line number Diff line change @@ -137,6 +137,13 @@ public class DefaultDeclarationFactory : IDeclarationFactory
137
137
initialValue : BoxShadowDeclaration . InitialValue ,
138
138
flags : BoxShadowDeclaration . Flags )
139
139
} ,
140
+ {
141
+ BoxSizingDeclaration . Name , new DeclarationInfo (
142
+ name : BoxSizingDeclaration . Name ,
143
+ converter : BoxSizingDeclaration . Converter ,
144
+ initialValue : BoxSizingDeclaration . InitialValue ,
145
+ flags : BoxSizingDeclaration . Flags )
146
+ } ,
140
147
{
141
148
ClearDeclaration . Name , new DeclarationInfo (
142
149
name : ClearDeclaration . Name ,
You can’t perform that action at this time.
0 commit comments