@@ -628,7 +628,7 @@ public void CssGridLengthAndLengthLegal()
628
628
}
629
629
630
630
[ Test ]
631
- public void CssGridStirngMinmaxAndStringLegal ( )
631
+ public void CssGridStringMinmaxAndStringLegal ( )
632
632
{
633
633
var snippet = @"grid: ""a"" minmax(100px, max-content) ""b"" 20%" ;
634
634
var property = ParseDeclaration ( snippet ) ;
@@ -676,5 +676,88 @@ public void CssGridNoneLegal()
676
676
Assert . IsTrue ( property . HasValue ) ;
677
677
Assert . AreEqual ( "none" , property . Value ) ;
678
678
}
679
+
680
+ [ Test ]
681
+ public void CssGridTemplateNoneLegal ( )
682
+ {
683
+ var snippet = @"grid-template: none" ;
684
+ var property = ParseDeclaration ( snippet ) ;
685
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
686
+ Assert . IsTrue ( property . HasValue ) ;
687
+ Assert . AreEqual ( "none" , property . Value ) ;
688
+ }
689
+
690
+ [ Test ]
691
+ public void CssGridTemplateLineNamesAndStringWithFractionsLegal ( )
692
+ {
693
+ var snippet = @"grid-template: [header-top] ""a a a"" [header-bottom]
694
+ [main-top] ""b b b"" 1fr [main-bottom] / auto 1fr auto" ;
695
+ var property = ParseDeclaration ( snippet ) ;
696
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
697
+ Assert . IsTrue ( property . HasValue ) ;
698
+ Assert . AreEqual ( "[header-top] \" a a a\" [header-bottom] [main-top] \" b b b\" 1fr [main-bottom] / auto 1fr auto" , property . Value ) ;
699
+ }
700
+
701
+ [ Test ]
702
+ public void CssGridTemplateStirngsAndWidthsLegal ( )
703
+ {
704
+ var snippet = @"grid-template: ""a a a"" 20%
705
+ ""b b b"" auto" ;
706
+ var property = ParseDeclaration ( snippet ) ;
707
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
708
+ Assert . IsTrue ( property . HasValue ) ;
709
+ Assert . AreEqual ( "\" a a a\" 20% \" b b b\" auto" , property . Value ) ;
710
+ }
711
+
712
+ [ Test ]
713
+ public void CssGridTemplateStringsLegal ( )
714
+ {
715
+ var snippet = @"grid-template: ""a a a""
716
+ ""b b b""" ;
717
+ var property = ParseDeclaration ( snippet ) ;
718
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
719
+ Assert . IsTrue ( property . HasValue ) ;
720
+ Assert . AreEqual ( "\" a a a\" \" b b b\" " , property . Value ) ;
721
+ }
722
+
723
+ [ Test ]
724
+ public void CssGridTemplateFitContentColumnsAndRowsLegal ( )
725
+ {
726
+ var snippet = @"grid-template: fit-content(100px) / fit-content(40%)" ;
727
+ var property = ParseDeclaration ( snippet ) ;
728
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
729
+ Assert . IsTrue ( property . HasValue ) ;
730
+ Assert . AreEqual ( "fit-content(100px) / fit-content(40%)" , property . Value ) ;
731
+ }
732
+
733
+ [ Test ]
734
+ public void CssGridTemplateLineNamesAndPercentagesLegal ( )
735
+ {
736
+ var snippet = @"grid-template: [linename] 100px / [columnname1] 30% [columnname2] 70%" ;
737
+ var property = ParseDeclaration ( snippet ) ;
738
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
739
+ Assert . IsTrue ( property . HasValue ) ;
740
+ Assert . AreEqual ( "[linename] 100px / [columnname1] 30% [columnname2] 70%" , property . Value ) ;
741
+ }
742
+
743
+ [ Test ]
744
+ public void CssGridTemplateRowsAndColumnsWithAutoLegal ( )
745
+ {
746
+ var snippet = @"grid-template: auto 1fr / auto 1fr auto" ;
747
+ var property = ParseDeclaration ( snippet ) ;
748
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
749
+ Assert . IsTrue ( property . HasValue ) ;
750
+ Assert . AreEqual ( "auto 1fr / auto 1fr auto" , property . Value ) ;
751
+ }
752
+
753
+ [ Test ]
754
+ public void CssGridTemplateRowsAndColumnsWithFractionsLegal ( )
755
+ {
756
+ var snippet = @"grid-template: 100px 1fr / 50px 1fr" ;
757
+ var property = ParseDeclaration ( snippet ) ;
758
+ Assert . AreEqual ( "grid-template" , property . Name ) ;
759
+ Assert . IsTrue ( property . HasValue ) ;
760
+ Assert . AreEqual ( "100px 1fr / 50px 1fr" , property . Value ) ;
761
+ }
679
762
}
680
763
}
0 commit comments