mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Port textAlign module to plugin
This commit is contained in:
parent
7e2e27818c
commit
fbeadb76cc
@ -1,3 +1,4 @@
|
||||
import textAlign from './plugins/textAlign'
|
||||
import textColors from './plugins/textColors'
|
||||
import textSizes from './plugins/textSizes'
|
||||
import textStyle from './plugins/textStyle'
|
||||
@ -10,6 +11,7 @@ import width from './plugins/width'
|
||||
import zIndex from './plugins/zIndex'
|
||||
|
||||
export default [
|
||||
textAlign(),
|
||||
textColors(),
|
||||
textSizes(),
|
||||
textStyle(),
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
import defineClasses from '../util/defineClasses'
|
||||
|
||||
export default function() {
|
||||
return defineClasses({
|
||||
'text-left': { 'text-align': 'left' },
|
||||
'text-center': { 'text-align': 'center' },
|
||||
'text-right': { 'text-align': 'right' },
|
||||
'text-justify': { 'text-align': 'justify' },
|
||||
})
|
||||
}
|
||||
10
src/plugins/textAlign.js
Normal file
10
src/plugins/textAlign.js
Normal file
@ -0,0 +1,10 @@
|
||||
export default function () {
|
||||
return function ({ addUtilities, config }) {
|
||||
addUtilities({
|
||||
'.text-left': { 'text-align': 'left' },
|
||||
'.text-center': { 'text-align': 'center' },
|
||||
'.text-right': { 'text-align': 'right' },
|
||||
'.text-justify': { 'text-align': 'justify' },
|
||||
}, config('modules.textAlign'))
|
||||
}
|
||||
}
|
||||
@ -37,7 +37,6 @@ import shadows from './generators/shadows'
|
||||
import svgFill from './generators/svgFill'
|
||||
import svgStroke from './generators/svgStroke'
|
||||
import tableLayout from './generators/tableLayout'
|
||||
import textAlign from './generators/textAlign'
|
||||
|
||||
export default [
|
||||
{ name: 'lists', generator: lists },
|
||||
@ -79,5 +78,4 @@ export default [
|
||||
{ name: 'svgFill', generator: svgFill },
|
||||
{ name: 'svgStroke', generator: svgStroke },
|
||||
{ name: 'tableLayout', generator: tableLayout },
|
||||
{ name: 'textAlign', generator: textAlign },
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user