@@ -63,6 +63,8 @@ module.exports = {
6363 warnings : 0 ,
6464 args : [ 'always' , { only : / ^ h t m l $ / i } ]
6565 } ,
66+
67+ // Proposal nesting syntax
6668 {
6769 source : '.foo { color: blue; } body .foo { color: rebeccapurple; } html .foo { color: red; }' ,
6870 expect : '.foo { color: blue; @nest body & { color: rebeccapurple; } @nest html & { color: red; } }' ,
@@ -89,6 +91,33 @@ module.exports = {
8991 args : [ 'always' , { only : 'body' } ]
9092 } ,
9193
94+ // SCSS nesting syntax
95+ {
96+ source : '.foo { color: blue; } body .foo { color: rebeccapurple; } html .foo { color: red; }' ,
97+ expect : '.foo { color: blue; body & { color: rebeccapurple; } html & { color: red; } }' ,
98+ args : [ 'always' , { syntax : 'scss' } ]
99+ } ,
100+ {
101+ source : '.foo { color: blue; } body .foo { color: rebeccapurple; } html .foo { color: red; }' ,
102+ expect : '.foo { color: blue; body & { color: rebeccapurple; } } html .foo { color: red; }' ,
103+ args : [ 'always' , { syntax : 'scss' , except : / ^ h t m l $ / i } ]
104+ } ,
105+ {
106+ source : '.foo { color: blue; } body .foo { color: rebeccapurple; } html .foo { color: red; }' ,
107+ expect : '.foo { color: blue; body & { color: rebeccapurple; } } html .foo { color: red; }' ,
108+ args : [ 'always' , { syntax : 'scss' , except : 'html' } ]
109+ } ,
110+ {
111+ source : '.foo { color: blue; } body .foo { color: rebeccapurple; } html .foo { color: red; }' ,
112+ expect : '.foo { color: blue; body & { color: rebeccapurple; } } html .foo { color: red; }' ,
113+ args : [ 'always' , { syntax : 'scss' , only : / ^ b o d y $ / i } ]
114+ } ,
115+ {
116+ source : '.foo { color: blue; } body .foo { color: rebeccapurple; } html .foo { color: red; }' ,
117+ expect : '.foo { color: blue; body & { color: rebeccapurple; } } html .foo { color: red; }' ,
118+ args : [ 'always' , { syntax : 'scss' , only : 'body' } ]
119+ } ,
120+
92121 /* Test Nesting Media Rules */
93122 {
94123 source : '.foo { color: blue; } @media (min-width: 960px) { .foo { color: rebeccapurple; } }' ,
0 commit comments