@@ -700,30 +700,34 @@ func TestCSSExternalQueryAndHashMatchIssue1822(t *testing.T) {
700
700
func TestCSSNestingOldBrowser (t * testing.T ) {
701
701
css_suite .expectBundled (t , bundled {
702
702
files : map [string ]string {
703
- "/nested-@layer.css" : `a { @layer base { color: red; } }` ,
704
- "/nested-@media.css" : `a { @media screen { color: red; } }` ,
705
- "/nested-ampersand.css" : `a { &, & { color: red; } }` ,
706
- "/nested-attribute.css" : `a { [href] { color: red; } }` ,
707
- "/nested-colon.css" : `a { :hover { color: red; } }` ,
708
- "/nested-dot.css" : `a { .cls { color: red; } }` ,
709
- "/nested-greaterthan.css" : `a { > b { color: red; } }` ,
710
- "/nested-hash.css" : `a { #id { color: red; } }` ,
711
- "/nested-plus.css" : `a { + b { color: red; } }` ,
712
- "/nested-tilde.css" : `a { ~ b { color: red; } }` ,
713
-
714
- "/toplevel-ampersand.css" : `a { &, & { color: red; } }` ,
715
- "/toplevel-attribute.css" : `a { [href] { color: red; } }` ,
716
- "/toplevel-colon.css" : `a { :hover { color: red; } }` ,
717
- "/toplevel-dot.css" : `a { .cls { color: red; } }` ,
718
- "/toplevel-greaterthan.css" : `a { > b { color: red; } }` ,
719
- "/toplevel-hash.css" : `a { #id { color: red; } }` ,
720
- "/toplevel-plus.css" : `a { + b { color: red; } }` ,
721
- "/toplevel-tilde.css" : `a { ~ b { color: red; } }` ,
703
+ "/nested-@layer.css" : `a { @layer base { color: red; } }` ,
704
+ "/nested-@media.css" : `a { @media screen { color: red; } }` ,
705
+ "/nested-ampersand-twice.css" : `a { &, & { color: red; } }` ,
706
+ "/nested-ampersand-first.css" : `a { &, b { color: red; } }` ,
707
+ "/nested-attribute.css" : `a { [href] { color: red; } }` ,
708
+ "/nested-colon.css" : `a { :hover { color: red; } }` ,
709
+ "/nested-dot.css" : `a { .cls { color: red; } }` ,
710
+ "/nested-greaterthan.css" : `a { > b { color: red; } }` ,
711
+ "/nested-hash.css" : `a { #id { color: red; } }` ,
712
+ "/nested-plus.css" : `a { + b { color: red; } }` ,
713
+ "/nested-tilde.css" : `a { ~ b { color: red; } }` ,
714
+
715
+ "/toplevel-ampersand-twice.css" : `&, & { color: red; }` ,
716
+ "/toplevel-ampersand-first.css" : `&, a { color: red; }` ,
717
+ "/toplevel-ampersand-second.css" : `a, & { color: red; }` ,
718
+ "/toplevel-attribute.css" : `[href] { color: red; }` ,
719
+ "/toplevel-colon.css" : `:hover { color: red; }` ,
720
+ "/toplevel-dot.css" : `.cls { color: red; }` ,
721
+ "/toplevel-greaterthan.css" : `> b { color: red; }` ,
722
+ "/toplevel-hash.css" : `#id { color: red; }` ,
723
+ "/toplevel-plus.css" : `+ b { color: red; }` ,
724
+ "/toplevel-tilde.css" : `~ b { color: red; }` ,
722
725
},
723
726
entryPaths : []string {
724
727
"/nested-@layer.css" ,
725
728
"/nested-@media.css" ,
726
- "/nested-ampersand.css" ,
729
+ "/nested-ampersand-twice.css" ,
730
+ "/nested-ampersand-first.css" ,
727
731
"/nested-attribute.css" ,
728
732
"/nested-colon.css" ,
729
733
"/nested-dot.css" ,
@@ -732,7 +736,9 @@ func TestCSSNestingOldBrowser(t *testing.T) {
732
736
"/nested-plus.css" ,
733
737
"/nested-tilde.css" ,
734
738
735
- "/toplevel-ampersand.css" ,
739
+ "/toplevel-ampersand-twice.css" ,
740
+ "/toplevel-ampersand-first.css" ,
741
+ "/toplevel-ampersand-second.css" ,
736
742
"/toplevel-attribute.css" ,
737
743
"/toplevel-colon.css" ,
738
744
"/toplevel-dot.css" ,
@@ -749,20 +755,20 @@ func TestCSSNestingOldBrowser(t *testing.T) {
749
755
},
750
756
expectedScanLog : `nested-@layer.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
751
757
nested-@media.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
752
- nested-ampersand.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
758
+ nested-ampersand-first.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
759
+ nested-ampersand-twice.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
753
760
nested-attribute.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
754
761
nested-colon.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
755
762
nested-dot.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
756
763
nested-greaterthan.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
757
764
nested-hash.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
758
765
nested-plus.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
759
766
nested-tilde.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
760
- toplevel-ampersand.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
761
- toplevel-attribute .css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
762
- toplevel-colon .css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
763
- toplevel-dot .css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
767
+ toplevel-ampersand-first .css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
768
+ toplevel-ampersand-second .css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
769
+ toplevel-ampersand-twice .css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
770
+ toplevel-ampersand-twice .css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
764
771
toplevel-greaterthan.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
765
- toplevel-hash.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
766
772
toplevel-plus.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
767
773
toplevel-tilde.css: WARNING: CSS nesting syntax is not supported in the configured target environment (chrome10)
768
774
` ,
0 commit comments