Port backgroundRepeat module to plugin
This commit is contained in:
parent
5a372877a6
commit
6112b3e345
4 changed files with 12 additions and 12 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import backgroundRepeat from './plugins/backgroundRepeat'
|
||||
import backgroundSize from './plugins/backgroundSize'
|
||||
import borderCollapse from './plugins/borderCollapse'
|
||||
import borderColors from './plugins/borderColors'
|
||||
|
|
@ -45,6 +46,7 @@ import zIndex from './plugins/zIndex'
|
|||
|
||||
export default function (config) {
|
||||
return [
|
||||
config.modules.backgroundRepeat === false ? () => {} : backgroundRepeat(),
|
||||
config.modules.backgroundSize === false ? () => {} : backgroundSize(),
|
||||
config.modules.borderCollapse === false ? () => {} : borderCollapse(),
|
||||
config.modules.borderColors === false ? () => {} : borderColors(),
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
import defineClasses from '../util/defineClasses'
|
||||
|
||||
export default function() {
|
||||
return defineClasses({
|
||||
'bg-repeat': { 'background-repeat': 'repeat' },
|
||||
'bg-no-repeat': { 'background-repeat': 'no-repeat' },
|
||||
'bg-repeat-x': { 'background-repeat': 'repeat-x' },
|
||||
'bg-repeat-y': { 'background-repeat': 'repeat-y' },
|
||||
})
|
||||
}
|
||||
10
src/plugins/backgroundRepeat.js
Normal file
10
src/plugins/backgroundRepeat.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export default function () {
|
||||
return function ({ addUtilities, config }) {
|
||||
addUtilities({
|
||||
'.bg-repeat': { 'background-repeat': 'repeat' },
|
||||
'.bg-no-repeat': { 'background-repeat': 'no-repeat' },
|
||||
'.bg-repeat-x': { 'background-repeat': 'repeat-x' },
|
||||
'.bg-repeat-y': { 'background-repeat': 'repeat-y' },
|
||||
}, config('modules.backgroundRepeat'))
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ import appearance from './generators/appearance'
|
|||
import backgroundAttachment from './generators/backgroundAttachment'
|
||||
import backgroundColors from './generators/backgroundColors'
|
||||
import backgroundPosition from './generators/backgroundPosition'
|
||||
import backgroundRepeat from './generators/backgroundRepeat'
|
||||
|
||||
export default [
|
||||
{ name: 'lists', generator: lists },
|
||||
|
|
@ -11,5 +10,4 @@ export default [
|
|||
{ name: 'backgroundAttachment', generator: backgroundAttachment },
|
||||
{ name: 'backgroundColors', generator: backgroundColors },
|
||||
{ name: 'backgroundPosition', generator: backgroundPosition },
|
||||
{ name: 'backgroundRepeat', generator: backgroundRepeat },
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue