mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Split justifyContent into separate plugin
This commit is contained in:
parent
04163056f6
commit
ad282c6d8a
@ -23,6 +23,7 @@ module.exports = {
|
||||
flexWrap: ['responsive'],
|
||||
alignItems: ['responsive'],
|
||||
alignSelf: ['responsive'],
|
||||
justifyContent: ['responsive'],
|
||||
flexbox: ['responsive'],
|
||||
float: ['responsive'],
|
||||
fontFamily: ['responsive'],
|
||||
|
||||
@ -17,6 +17,7 @@ import flexDirection from './plugins/flexDirection'
|
||||
import flexWrap from './plugins/flexWrap'
|
||||
import alignItems from './plugins/alignItems'
|
||||
import alignSelf from './plugins/alignSelf'
|
||||
import justifyContent from './plugins/justifyContent'
|
||||
import flexbox from './plugins/flexbox'
|
||||
import float from './plugins/float'
|
||||
import fontFamily from './plugins/fontFamily'
|
||||
@ -95,6 +96,7 @@ export default function(config) {
|
||||
flexWrap,
|
||||
alignItems,
|
||||
alignSelf,
|
||||
justifyContent,
|
||||
flexbox,
|
||||
float,
|
||||
fontFamily,
|
||||
|
||||
@ -2,21 +2,6 @@ export default function({ variants }) {
|
||||
return function({ addUtilities }) {
|
||||
addUtilities(
|
||||
{
|
||||
'.justify-start': {
|
||||
'justify-content': 'flex-start',
|
||||
},
|
||||
'.justify-end': {
|
||||
'justify-content': 'flex-end',
|
||||
},
|
||||
'.justify-center': {
|
||||
'justify-content': 'center',
|
||||
},
|
||||
'.justify-between': {
|
||||
'justify-content': 'space-between',
|
||||
},
|
||||
'.justify-around': {
|
||||
'justify-content': 'space-around',
|
||||
},
|
||||
'.content-center': {
|
||||
'align-content': 'center',
|
||||
},
|
||||
|
||||
24
src/plugins/justifyContent.js
Normal file
24
src/plugins/justifyContent.js
Normal file
@ -0,0 +1,24 @@
|
||||
export default function({ variants }) {
|
||||
return function({ addUtilities }) {
|
||||
addUtilities(
|
||||
{
|
||||
'.justify-start': {
|
||||
'justify-content': 'flex-start',
|
||||
},
|
||||
'.justify-end': {
|
||||
'justify-content': 'flex-end',
|
||||
},
|
||||
'.justify-center': {
|
||||
'justify-content': 'center',
|
||||
},
|
||||
'.justify-between': {
|
||||
'justify-content': 'space-between',
|
||||
},
|
||||
'.justify-around': {
|
||||
'justify-content': 'space-around',
|
||||
},
|
||||
},
|
||||
variants
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user