File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
AngleSharp.Css/Declarations
AngleSharp.Css.Tests/Declarations Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -677,5 +677,17 @@ public void CssFontStyleWeightSizeHeightFamiliesLegal()
677
677
Assert . IsTrue ( property . HasValue ) ;
678
678
Assert . AreEqual ( "italic bold 12px / 30px Georgia, serif" , property . Value ) ;
679
679
}
680
+
681
+ [ Test ]
682
+ public void CssFontStyleNumericWeightSizeFamiliesLegal ( )
683
+ {
684
+ var snippet = "font: 400 12px Georgia, serif" ;
685
+ var property = ParseDeclaration ( snippet ) ;
686
+ Assert . AreEqual ( "font" , property . Name ) ;
687
+ Assert . IsFalse ( property . IsImportant ) ;
688
+ Assert . IsFalse ( property . IsInherited ) ;
689
+ Assert . IsTrue ( property . HasValue ) ;
690
+ Assert . AreEqual ( "400 12px Georgia, serif" , property . Value ) ;
691
+ }
680
692
}
681
693
}
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public ICssValue Convert(StringSource source)
60
60
61
61
if ( weight == null )
62
62
{
63
- weight = source . ParseConstant ( Map . FontWeights ) ;
63
+ weight = FontWeightDeclaration . Converter . Convert ( source ) ;
64
64
source . SkipSpacesAndComments ( ) ;
65
65
}
66
66
You can’t perform that action at this time.
0 commit comments