File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
AngleSharp.Css/Declarations
AngleSharp.Css.Tests/Declarations Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 6
6
- Added ` GetMatchingStyles ` extension for ` ICssRuleList `
7
7
- Added ` MinifyStyleFormatter `
8
8
- Added ` Prettify ` and ` Minify ` extension methods
9
+ - Fixed border-style expansion order (#34 )
9
10
10
11
# 0.12.1
11
12
Original file line number Diff line number Diff line change 3
3
4
4
namespace AngleSharp . Css . Tests . Declarations
5
5
{
6
+ using AngleSharp . Dom ;
6
7
using NUnit . Framework ;
7
8
using static CssConstructionFunctions ;
8
9
@@ -244,6 +245,22 @@ public void CssBorderStyleHiddenDottedNoneNoneLegal()
244
245
Assert . AreEqual ( "hidden dotted none none" , property . Value ) ;
245
246
}
246
247
248
+ [ Test ]
249
+ public void CssBorderStyleMultipleExpandCorrectly_Issue34 ( )
250
+ {
251
+ var source = @"<!DOCTYPE html>
252
+ <html>
253
+ <head><title></title></head>
254
+ <body style=""border-style: hidden double dashed;""></body>
255
+ </html>" ;
256
+ var document = source . ToHtmlDocument ( Configuration . Default . WithCss ( ) ) ;
257
+ var styleDeclaration = document . Body . ComputeCurrentStyle ( ) ;
258
+ Assert . AreEqual ( "hidden" , styleDeclaration . GetBorderTopStyle ( ) ) ;
259
+ Assert . AreEqual ( "double" , styleDeclaration . GetBorderLeftStyle ( ) ) ;
260
+ Assert . AreEqual ( "double" , styleDeclaration . GetBorderRightStyle ( ) ) ;
261
+ Assert . AreEqual ( "dashed" , styleDeclaration . GetBorderBottomStyle ( ) ) ;
262
+ }
263
+
247
264
[ Test ]
248
265
public void CssBorderStyleWavyIllegal ( )
249
266
{
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ static class BorderStyleDeclaration
21
21
22
22
public static String [ ] Longhands = new [ ]
23
23
{
24
- PropertyNames . BorderRightStyle ,
25
24
PropertyNames . BorderTopStyle ,
25
+ PropertyNames . BorderRightStyle ,
26
26
PropertyNames . BorderBottomStyle ,
27
27
PropertyNames . BorderLeftStyle ,
28
28
} ;
You can’t perform that action at this time.
0 commit comments