@@ -11,9 +11,30 @@ public void OpacityPercentLegal()
1111 Assert . Equal ( "opacity" , property . Name ) ;
1212 Assert . False ( property . IsImportant ) ;
1313 Assert . IsType < OpacityProperty > ( property ) ;
14- var concrete = ( OpacityProperty ) property ;
15- Assert . False ( concrete . IsInherited ) ;
16- Assert . True ( concrete . HasValue ) ;
17- Assert . Equal ( "50%" , concrete . Value ) ;
14+ var result = ( OpacityProperty ) property ;
15+ Assert . False ( result . IsInherited ) ;
16+ Assert . True ( result . HasValue ) ;
17+ Assert . Equal ( "50%" , result . Value ) ;
18+ }
19+
20+
21+ [ Fact ]
22+ public void OpacityVarianceTests ( )
23+ {
24+ var property = ParseDeclaration ( "opacity: 50%" ) ;
25+ var result = ( OpacityProperty ) property ;
26+ Assert . Equal ( "50%" , result . Value ) ;
27+
28+ property = ParseDeclaration ( "opacity: .50" ) ;
29+ result = ( OpacityProperty ) property ;
30+ Assert . Equal ( "50%" , result . Value ) ;
31+
32+ property = ParseDeclaration ( "opacity: 1" ) ;
33+ result = ( OpacityProperty ) property ;
34+ Assert . Equal ( "100%" , result . Value ) ;
35+
36+ property = ParseDeclaration ( "opacity: 0" ) ;
37+ result = ( OpacityProperty ) property ;
38+ Assert . Equal ( "0%" , result . Value ) ;
1839 }
1940}
0 commit comments