Skip to content

Commit bf248cb

Browse files
committed
only add the @defaults for jit mode
1 parent 2122daf commit bf248cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/plugins/divideWidth.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
export default function () {
2-
return function ({ matchUtilities, addUtilities, theme, variants }) {
2+
return function ({ matchUtilities, addUtilities, theme, variants, config }) {
33
matchUtilities(
44
{
55
'divide-x': (value) => {
66
value = value === '0' ? '0px' : value
77

88
return {
99
'& > :not([hidden]) ~ :not([hidden])': {
10-
'@defaults border-width': {},
10+
...(config('mode') === 'jit' ? { '@defaults border-width': {} } : {}),
1111
'--tw-divide-x-reverse': '0',
1212
'border-right-width': `calc(${value} * var(--tw-divide-x-reverse))`,
1313
'border-left-width': `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`,
@@ -19,7 +19,7 @@ export default function () {
1919

2020
return {
2121
'& > :not([hidden]) ~ :not([hidden])': {
22-
'@defaults border-width': {},
22+
...(config('mode') === 'jit' ? { '@defaults border-width': {} } : {}),
2323
'--tw-divide-y-reverse': '0',
2424
'border-top-width': `calc(${value} * calc(1 - var(--tw-divide-y-reverse)))`,
2525
'border-bottom-width': `calc(${value} * var(--tw-divide-y-reverse))`,
@@ -37,11 +37,11 @@ export default function () {
3737
addUtilities(
3838
{
3939
'.divide-y-reverse > :not([hidden]) ~ :not([hidden])': {
40-
'@defaults border-width': {},
40+
...(config('mode') === 'jit' ? { '@defaults border-width': {} } : {}),
4141
'--tw-divide-y-reverse': '1',
4242
},
4343
'.divide-x-reverse > :not([hidden]) ~ :not([hidden])': {
44-
'@defaults border-width': {},
44+
...(config('mode') === 'jit' ? { '@defaults border-width': {} } : {}),
4545
'--tw-divide-x-reverse': '1',
4646
},
4747
},

0 commit comments

Comments
 (0)