Divide border style

This commit is contained in:
Juno 2020-06-25 09:59:01 +08:00
parent bf39400766
commit 07fcc11906
2 changed files with 26 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import container from './plugins/container'
import space from './plugins/space'
import divideWidth from './plugins/divideWidth'
import divideColor from './plugins/divideColor'
import divideStyle from './plugins/divideStyle'
import accessibility from './plugins/accessibility'
import appearance from './plugins/appearance'
import backgroundAttachment from './plugins/backgroundAttachment'
@ -107,6 +108,7 @@ export default function({ corePlugins: corePluginConfig }) {
space,
divideWidth,
divideColor,
divideStyle,
divideOpacity,
accessibility,
appearance,

View File

@ -0,0 +1,24 @@
export default function() {
return function({ addUtilities, variants }) {
addUtilities(
{
'.divide-solid > :not(template) ~ :not(template)': {
'border-style': 'solid',
},
'.divide-dashed > :not(template) ~ :not(template)': {
'border-style': 'dashed',
},
'.divide-dotted > :not(template) ~ :not(template)': {
'border-style': 'dotted',
},
'.divide-double > :not(template) ~ :not(template)': {
'border-style': 'double',
},
'.divide-none > :not(template) ~ :not(template)': {
'border-style': 'none',
},
},
variants('divideStyle')
)
}
}