@@ -2,7 +2,7 @@ const flattenColorPalette = require('../../lib/util/flattenColorPalette').defaul
2
2
const withAlphaVariable = require ( '../../lib/util/withAlphaVariable' ) . default
3
3
const { asColor, nameClass } = require ( '../pluginUtils' )
4
4
5
- module . exports = function ( { matchUtilities, theme } ) {
5
+ module . exports = function ( { corePlugins , matchUtilities, theme } ) {
6
6
let colorPalette = flattenColorPalette ( theme ( 'divideColor' ) )
7
7
8
8
// TODO: Make sure there is no issue with DEFAULT here
@@ -14,12 +14,20 @@ module.exports = function ({ matchUtilities, theme }) {
14
14
return [ ]
15
15
}
16
16
17
+ if ( corePlugins ( 'divideOpacity' ) ) {
18
+ return {
19
+ [ `${ nameClass ( 'divide' , modifier ) } > :not([hidden]) ~ :not([hidden])` ] : withAlphaVariable ( {
20
+ color : colorPalette [ modifier ] ,
21
+ property : 'border-color' ,
22
+ variable : '--tw-divide-opacity' ,
23
+ } ) ,
24
+ }
25
+ }
26
+
17
27
return {
18
- [ `${ nameClass ( 'divide' , modifier ) } > :not([hidden]) ~ :not([hidden])` ] : withAlphaVariable ( {
19
- color : colorPalette [ modifier ] ,
20
- property : 'border-color' ,
21
- variable : '--tw-divide-opacity' ,
22
- } ) ,
28
+ [ `${ nameClass ( 'divide' , modifier ) } > :not([hidden]) ~ :not([hidden])` ] : {
29
+ 'border-color' : value ,
30
+ } ,
23
31
}
24
32
} ,
25
33
} )
0 commit comments