WIP
This commit is contained in:
parent
6dbd28cbb3
commit
4e912e64c6
2 changed files with 74 additions and 13 deletions
|
|
@ -3,20 +3,38 @@ import withAlphaVariable from '../util/withAlphaVariable'
|
|||
|
||||
export default function () {
|
||||
return function ({ config, addBase, matchUtilities, theme, variants, corePlugins }) {
|
||||
if (!corePlugins('borderOpacity')) {
|
||||
addBase({
|
||||
'*, ::before, ::after': {
|
||||
'border-color': theme('borderColor.DEFAULT', 'currentColor'),
|
||||
},
|
||||
})
|
||||
if (config('mode') === 'jit') {
|
||||
if (!corePlugins('borderOpacity')) {
|
||||
addBase({
|
||||
'*::tailwind': {
|
||||
'border-color': theme('borderColor.DEFAULT', 'currentColor'),
|
||||
},
|
||||
})
|
||||
} else {
|
||||
addBase({
|
||||
'*::tailwind': withAlphaVariable({
|
||||
color: theme('borderColor.DEFAULT', 'currentColor'),
|
||||
property: 'border-color',
|
||||
variable: '--tw-border-opacity',
|
||||
}),
|
||||
})
|
||||
}
|
||||
} else {
|
||||
addBase({
|
||||
'*, ::before, ::after': withAlphaVariable({
|
||||
color: theme('borderColor.DEFAULT', 'currentColor'),
|
||||
property: 'border-color',
|
||||
variable: '--tw-border-opacity',
|
||||
}),
|
||||
})
|
||||
if (!corePlugins('borderOpacity')) {
|
||||
addBase({
|
||||
'*, ::before, ::after': {
|
||||
'border-color': theme('borderColor.DEFAULT', 'currentColor'),
|
||||
},
|
||||
})
|
||||
} else {
|
||||
addBase({
|
||||
'*, ::before, ::after': withAlphaVariable({
|
||||
color: theme('borderColor.DEFAULT', 'currentColor'),
|
||||
property: 'border-color',
|
||||
variable: '--tw-border-opacity',
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
matchUtilities(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue