@@ -218,17 +218,17 @@ test('the default config can be overridden using the presets key', () => {
218
218
{
219
219
theme : {
220
220
extend : {
221
- colors : {
222
- black : 'black ' ,
221
+ minHeight : {
222
+ 24 : '24px ' ,
223
223
} ,
224
- backgroundColor : ( theme ) => theme ( 'colors' ) ,
225
224
} ,
226
225
} ,
227
- corePlugins : [ 'backgroundColor' ] ,
226
+ corePlugins : [ 'minHeight' ] ,
227
+ variants : { minHeight : [ ] } ,
228
228
} ,
229
229
] ,
230
230
theme : {
231
- extend : { colors : { white : 'white ' } } ,
231
+ extend : { minHeight : { 48 : '48px ' } } ,
232
232
} ,
233
233
} ) ,
234
234
] )
@@ -240,11 +240,62 @@ test('the default config can be overridden using the presets key', () => {
240
240
)
241
241
. then ( ( result ) => {
242
242
const expected = `
243
- .bg-black {
244
- background-color: black ;
243
+ .min-h-0 {
244
+ min-height: 0 ;
245
245
}
246
- .bg-white {
247
- background-color: white;
246
+ .min-h-24 {
247
+ min-height: 24px;
248
+ }
249
+ .min-h-48 {
250
+ min-height: 48px;
251
+ }
252
+ .min-h-full {
253
+ min-height: 100%;
254
+ }
255
+ .min-h-screen {
256
+ min-height: 100vh;
257
+ }
258
+ `
259
+
260
+ expect ( result . css ) . toMatchCss ( expected )
261
+ } )
262
+ } )
263
+
264
+ test ( 'the default config can be removed by using an empty presets key in a preset' , ( ) => {
265
+ return postcss ( [
266
+ tailwind ( {
267
+ presets : [
268
+ {
269
+ presets : [ ] ,
270
+ theme : {
271
+ extend : {
272
+ minHeight : {
273
+ 24 : '24px' ,
274
+ } ,
275
+ } ,
276
+ } ,
277
+ corePlugins : [ 'minHeight' ] ,
278
+ variants : { minHeight : [ ] } ,
279
+ } ,
280
+ ] ,
281
+ theme : {
282
+ extend : { minHeight : { 48 : '48px' } } ,
283
+ } ,
284
+ } ) ,
285
+ ] )
286
+ . process (
287
+ `
288
+ @tailwind utilities
289
+ ` ,
290
+ { from : undefined }
291
+ )
292
+ . then ( ( result ) => {
293
+ const expected = `
294
+ .min-h-24 {
295
+ min-height: 24px;
296
+ }
297
+ .min-h-48 {
298
+ min-height: 48px;
248
299
}
249
300
`
250
301
@@ -257,13 +308,15 @@ test('presets can have their own presets', () => {
257
308
tailwind ( {
258
309
presets : [
259
310
{
311
+ presets : [ ] ,
260
312
theme : {
261
313
colors : { red : '#dd0000' } ,
262
314
} ,
263
315
} ,
264
316
{
265
317
presets : [
266
318
{
319
+ presets : [ ] ,
267
320
theme : {
268
321
colors : {
269
322
transparent : 'transparent' ,
0 commit comments