Skip to content

Commit 96439a3

Browse files
committed
Port borderCollapse module to plugin
1 parent 4715bda commit 96439a3

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/defaultPlugins.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import borderCollapse from './plugins/borderCollapse'
12
import borderColors from './plugins/borderColors'
23
import borderRadius from './plugins/borderRadius'
34
import borderStyle from './plugins/borderStyle'
@@ -43,6 +44,7 @@ import zIndex from './plugins/zIndex'
4344

4445
export default function (config) {
4546
return [
47+
config.modules.borderCollapse === false ? () => {} : borderCollapse(),
4648
config.modules.borderColors === false ? () => {} : borderColors(),
4749
config.modules.borderRadius === false ? () => {} : borderRadius(),
4850
config.modules.borderStyle === false ? () => {} : borderStyle(),

src/generators/borderCollapse.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/plugins/borderCollapse.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function () {
2+
return function ({ addUtilities, config }) {
3+
addUtilities({
4+
'.border-collapse': { 'border-collapse': 'collapse' },
5+
'.border-separate': { 'border-collapse': 'separate' },
6+
}, config('modules.borderCollapse'))
7+
}
8+
}

src/plugins/cursor.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
export default function () {
22
return function ({ addUtilities, config }) {
33
addUtilities({
4-
'.cursor-auto': { cursor: 'auto' },
5-
'.cursor-default': { cursor: 'default' },
6-
'.cursor-pointer': { cursor: 'pointer' },
7-
'.cursor-wait': { cursor: 'wait' },
8-
'.cursor-move': { cursor: 'move' },
9-
'.cursor-not-allowed': { cursor: 'not-allowed' },
4+
'.cursor-auto': { cursor: 'auto' },
5+
'.cursor-default': { cursor: 'default' },
6+
'.cursor-pointer': { cursor: 'pointer' },
7+
'.cursor-wait': { cursor: 'wait' },
8+
'.cursor-move': { cursor: 'move' },
9+
'.cursor-not-allowed': { cursor: 'not-allowed' },
1010
}, config('modules.cursor'))
1111
}
1212
}

src/utilityModules.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import backgroundColors from './generators/backgroundColors'
55
import backgroundPosition from './generators/backgroundPosition'
66
import backgroundRepeat from './generators/backgroundRepeat'
77
import backgroundSize from './generators/backgroundSize'
8-
import borderCollapse from './generators/borderCollapse'
98

109
export default [
1110
{ name: 'lists', generator: lists },
@@ -15,5 +14,4 @@ export default [
1514
{ name: 'backgroundPosition', generator: backgroundPosition },
1615
{ name: 'backgroundRepeat', generator: backgroundRepeat },
1716
{ name: 'backgroundSize', generator: backgroundSize },
18-
{ name: 'borderCollapse', generator: borderCollapse },
1917
]

0 commit comments

Comments
 (0)