File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -1202,3 +1202,54 @@ it('should work in layer', async () => {
1202
1202
}
1203
1203
` )
1204
1204
} )
1205
+
1206
+ it ( 'apply partitioning works with media queries' , async ( ) => {
1207
+ let config = {
1208
+ content : [ { raw : html `` } ] ,
1209
+ corePlugins : { preflight : false } ,
1210
+ }
1211
+
1212
+ let input = css `
1213
+ @tailwind base;
1214
+ @layer base {
1215
+ html ,
1216
+ body {
1217
+ @apply text-green-600;
1218
+ font-size : 1rem ;
1219
+ }
1220
+
1221
+ @media print {
1222
+ html ,
1223
+ body {
1224
+ @apply text-red-600;
1225
+ font-size : 2rem ;
1226
+ }
1227
+ }
1228
+ }
1229
+ `
1230
+
1231
+ await run ( input , config )
1232
+ const result = await run ( input , config )
1233
+
1234
+ expect ( result . css ) . toMatchFormattedCss ( css `
1235
+ html ,
1236
+ body {
1237
+ --tw-text-opacity : 1 ;
1238
+ color : rgb (22 163 74 / var (--tw-text-opacity ));
1239
+ font-size : 1rem ;
1240
+ }
1241
+
1242
+ @media print {
1243
+ html ,
1244
+ body {
1245
+ --tw-text-opacity : 1 ;
1246
+ color : rgb (220 38 38 / var (--tw-text-opacity ));
1247
+ }
1248
+ html ,
1249
+ body {
1250
+ font-size : 2rem ;
1251
+ }
1252
+ }
1253
+ ${ defaults }
1254
+ ` )
1255
+ } )
You can’t perform that action at this time.
0 commit comments