forked from tailwindlabs/tailwindcss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgap.js
More file actions
26 lines (24 loc) · 844 Bytes
/
gap.js
File metadata and controls
26 lines (24 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import createUtilityPlugin from '../util/createUtilityPlugin'
import { flagEnabled } from '../featureFlags'
export default function() {
return function({ target, config, ...args }) {
if (target('gap') === 'ie11') {
return
}
if (flagEnabled(config(), 'removeDeprecatedGapUtilities')) {
createUtilityPlugin('gap', [
['gap', ['gridGap', 'gap']],
['gap-x', ['gridColumnGap', 'columnGap']],
['gap-y', ['gridRowGap', 'rowGap']],
])({ target, config, ...args })
} else {
createUtilityPlugin('gap', [
['gap', ['gridGap', 'gap']],
['col-gap', ['gridColumnGap', 'columnGap']],
['gap-x', ['gridColumnGap', 'columnGap']],
['row-gap', ['gridRowGap', 'rowGap']],
['gap-y', ['gridRowGap', 'rowGap']],
])({ target, config, ...args })
}
}
}