File tree Expand file tree Collapse file tree 3 files changed +47
-9
lines changed Expand file tree Collapse file tree 3 files changed +47
-9
lines changed Original file line number Diff line number Diff line change @@ -1295,6 +1295,10 @@ button,
1295
1295
background-repeat : repeat-y;
1296
1296
}
1297
1297
1298
+ .bg-auto {
1299
+ background-size : auto;
1300
+ }
1301
+
1298
1302
.bg-cover {
1299
1303
background-size : cover;
1300
1304
}
@@ -5182,6 +5186,10 @@ button,
5182
5186
background-repeat : repeat-y;
5183
5187
}
5184
5188
5189
+ .sm\:bg-auto {
5190
+ background-size : auto;
5191
+ }
5192
+
5185
5193
.sm\:bg-cover {
5186
5194
background-size : cover;
5187
5195
}
@@ -9062,6 +9070,10 @@ button,
9062
9070
background-repeat : repeat-y;
9063
9071
}
9064
9072
9073
+ .md\:bg-auto {
9074
+ background-size : auto;
9075
+ }
9076
+
9065
9077
.md\:bg-cover {
9066
9078
background-size : cover;
9067
9079
}
@@ -12942,6 +12954,10 @@ button,
12942
12954
background-repeat : repeat-y;
12943
12955
}
12944
12956
12957
+ .lg\:bg-auto {
12958
+ background-size : auto;
12959
+ }
12960
+
12945
12961
.lg\:bg-cover {
12946
12962
background-size : cover;
12947
12963
}
@@ -16822,6 +16838,10 @@ button,
16822
16838
background-repeat : repeat-y;
16823
16839
}
16824
16840
16841
+ .xl\:bg-auto {
16842
+ background-size : auto;
16843
+ }
16844
+
16825
16845
.xl\:bg-cover {
16826
16846
background-size : cover;
16827
16847
}
Original file line number Diff line number Diff line change @@ -360,6 +360,26 @@ module.exports = {
360
360
backgroundColors : colors ,
361
361
362
362
363
+ /*
364
+ |-----------------------------------------------------------------------------
365
+ | Background sizes https://tailwindcss.com/docs/background-size
366
+ |-----------------------------------------------------------------------------
367
+ |
368
+ | Here is where you define your background sizes. We provide some common
369
+ | values that are useful in most projects, but feel free to add other sizes
370
+ | that are specific to your project here as well.
371
+ |
372
+ | Class name: .bg-{size}
373
+ |
374
+ */
375
+
376
+ backgroundSize : {
377
+ 'auto' : 'auto' ,
378
+ 'cover' : 'cover' ,
379
+ 'contain' : 'contain' ,
380
+ } ,
381
+
382
+
363
383
/*
364
384
|-----------------------------------------------------------------------------
365
385
| Border widths https://tailwindcss.com/docs/border-width
Original file line number Diff line number Diff line change 1
- import defineClasses from '../util/defineClasses'
1
+ import _ from 'lodash'
2
+ import defineClass from '../util/defineClass'
2
3
3
- export default function ( ) {
4
- return defineClasses ( {
5
- 'bg-cover' : {
6
- 'background-size' : 'cover' ,
7
- } ,
8
- 'bg-contain' : {
9
- 'background-size' : 'contain' ,
10
- } ,
4
+ export default function ( { backgroundSize } ) {
5
+ return _ . map ( backgroundSize , ( size , className ) => {
6
+ return defineClass ( `bg-${ className } ` , {
7
+ 'background-size' : size ,
8
+ } )
11
9
} )
12
10
}
You can’t perform that action at this time.
0 commit comments