Port backgroundAttachment module to plugin
This commit is contained in:
parent
c39ed44c13
commit
a6e96c8919
4 changed files with 11 additions and 11 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import backgroundAttachment from './plugins/backgroundAttachment'
|
||||
import backgroundColors from './plugins/backgroundColors'
|
||||
import backgroundPosition from './plugins/backgroundPosition'
|
||||
import backgroundRepeat from './plugins/backgroundRepeat'
|
||||
|
|
@ -48,6 +49,7 @@ import zIndex from './plugins/zIndex'
|
|||
|
||||
export default function (config) {
|
||||
return [
|
||||
config.modules.backgroundAttachment === false ? () => {} : backgroundAttachment(),
|
||||
config.modules.backgroundColors === false ? () => {} : backgroundColors(),
|
||||
config.modules.backgroundPosition === false ? () => {} : backgroundPosition(),
|
||||
config.modules.backgroundRepeat === false ? () => {} : backgroundRepeat(),
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import defineClasses from '../util/defineClasses'
|
||||
|
||||
export default function() {
|
||||
return defineClasses({
|
||||
'bg-fixed': { 'background-attachment': 'fixed' },
|
||||
'bg-local': { 'background-attachment': 'local' },
|
||||
'bg-scroll': { 'background-attachment': 'scroll' },
|
||||
})
|
||||
}
|
||||
9
src/plugins/backgroundAttachment.js
Normal file
9
src/plugins/backgroundAttachment.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export default function () {
|
||||
return function ({ addUtilities, config }) {
|
||||
addUtilities({
|
||||
'.bg-fixed': { 'background-attachment': 'fixed' },
|
||||
'.bg-local': { 'background-attachment': 'local' },
|
||||
'.bg-scroll': { 'background-attachment': 'scroll' },
|
||||
}, config('modules.backgroundAttachment'))
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
import lists from './generators/lists'
|
||||
import appearance from './generators/appearance'
|
||||
import backgroundAttachment from './generators/backgroundAttachment'
|
||||
|
||||
export default [
|
||||
{ name: 'lists', generator: lists },
|
||||
{ name: 'appearance', generator: appearance },
|
||||
{ name: 'backgroundAttachment', generator: backgroundAttachment },
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue