@@ -158,6 +158,35 @@ test('at-rules', () => {
158
158
} )
159
159
} )
160
160
161
+ test ( 'nested at-rules' , ( ) => {
162
+ let config = {
163
+ content : [ {
164
+ raw : html `<div class= "[@media_screen{@media_(hover:hover)}]:underline" > </ div> `
165
+ } ] ,
166
+ corePlugins : { preflight : false } ,
167
+ }
168
+
169
+ let input = css `
170
+ @tailwind base;
171
+ @tailwind components;
172
+ @tailwind utilities;
173
+ `
174
+
175
+ return run ( input , config ) . then ( ( result ) => {
176
+ expect ( result . css ) . toMatchFormattedCss ( css `
177
+ ${ defaults }
178
+
179
+ @media screen {
180
+ @media (hover : hover) {
181
+ .\[\@media_screen\{\@media_\(hover\:hover\)\}\]\:underline {
182
+ text-decoration-line : underline;
183
+ }
184
+ }
185
+ }
186
+ ` )
187
+ } )
188
+ } )
189
+
161
190
test ( 'at-rules with selector modifications' , ( ) => {
162
191
let config = {
163
192
content : [ { raw : html `<div class= "[@media_(hover:hover){&:hover}]:underline" > </ div> ` } ] ,
@@ -183,6 +212,35 @@ test('at-rules with selector modifications', () => {
183
212
} )
184
213
} )
185
214
215
+ test ( 'nested at-rules with selector modifications' , ( ) => {
216
+ let config = {
217
+ content : [ {
218
+ raw : html `<div class= "[@media_screen{@media_(hover:hover){&:hover}}]:underline" > </ div> `
219
+ } ] ,
220
+ corePlugins : { preflight : false } ,
221
+ }
222
+
223
+ let input = css `
224
+ @tailwind base;
225
+ @tailwind components;
226
+ @tailwind utilities;
227
+ `
228
+
229
+ return run ( input , config ) . then ( ( result ) => {
230
+ expect ( result . css ) . toMatchFormattedCss ( css `
231
+ ${ defaults }
232
+
233
+ @media screen {
234
+ @media (hover : hover) {
235
+ .\[\@media_screen\{\@media_\(hover\:hover\)\{\&\:hover\}\}\]\:underline : hover {
236
+ text-decoration-line : underline;
237
+ }
238
+ }
239
+ }
240
+ ` )
241
+ } )
242
+ } )
243
+
186
244
test ( 'attribute selectors' , ( ) => {
187
245
let config = {
188
246
content : [ { raw : html `<div class= "[&[data-open]]:underline" > </ div> ` } ] ,
0 commit comments