tailwindcss/src/plugins/gap.js

23 lines
766 B
JavaScript
Raw Normal View History

import createUtilityPlugin from '../util/createUtilityPlugin'
import { flagEnabled } from '../featureFlags'
2020-10-16 13:30:06 -04:00
export default function () {
return function ({ config, ...args }) {
if (flagEnabled(config(), 'removeDeprecatedGapUtilities')) {
createUtilityPlugin('gap', [
['gap', ['gridGap', 'gap']],
['gap-x', ['gridColumnGap', 'columnGap']],
['gap-y', ['gridRowGap', 'rowGap']],
2020-10-15 12:29:50 -04:00
])({ config, ...args })
} else {
createUtilityPlugin('gap', [
['gap', ['gridGap', 'gap']],
['col-gap', ['gridColumnGap', 'columnGap']],
['gap-x', ['gridColumnGap', 'columnGap']],
['row-gap', ['gridRowGap', 'rowGap']],
['gap-y', ['gridRowGap', 'rowGap']],
2020-10-15 12:29:50 -04:00
])({ config, ...args })
}
2020-04-26 15:10:12 -04:00
}
}