Add missing grid alignment utilities (#2306)
* added suppot for justify-self * Update fixtures * Add remaining grid alignment utilities * Update changelog Co-authored-by: Felix Alcala <felix.alcala@gmail.com>
This commit is contained in:
parent
b3270a5b31
commit
ff013c5e9c
14 changed files with 2729 additions and 304 deletions
|
|
@ -17,6 +17,9 @@ export default function() {
|
|||
'.content-around': {
|
||||
'align-content': 'space-around',
|
||||
},
|
||||
'.content-evenly': {
|
||||
'align-content': 'space-evenly',
|
||||
},
|
||||
},
|
||||
variants('alignContent')
|
||||
)
|
||||
|
|
|
|||
28
src/plugins/justifyItems.js
Normal file
28
src/plugins/justifyItems.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export default function() {
|
||||
return function({ addUtilities, variants, target }) {
|
||||
if (target('justifyItems') === 'ie11') {
|
||||
return
|
||||
}
|
||||
|
||||
addUtilities(
|
||||
{
|
||||
'.justify-items-auto': {
|
||||
'justify-items': 'auto',
|
||||
},
|
||||
'.justify-items-start': {
|
||||
'justify-items': 'start',
|
||||
},
|
||||
'.justify-items-end': {
|
||||
'justify-items': 'end',
|
||||
},
|
||||
'.justify-items-center': {
|
||||
'justify-items': 'center',
|
||||
},
|
||||
'.justify-items-stretch': {
|
||||
'justify-items': 'stretch',
|
||||
},
|
||||
},
|
||||
variants('justifyItems')
|
||||
)
|
||||
}
|
||||
}
|
||||
28
src/plugins/justifySelf.js
Normal file
28
src/plugins/justifySelf.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export default function() {
|
||||
return function({ addUtilities, variants, target }) {
|
||||
if (target('justifySelf') === 'ie11') {
|
||||
return
|
||||
}
|
||||
|
||||
addUtilities(
|
||||
{
|
||||
'.justify-self-auto': {
|
||||
'justify-self': 'auto',
|
||||
},
|
||||
'.justify-self-start': {
|
||||
'justify-self': 'start',
|
||||
},
|
||||
'.justify-self-end': {
|
||||
'justify-self': 'end',
|
||||
},
|
||||
'.justify-self-center': {
|
||||
'justify-self': 'center',
|
||||
},
|
||||
'.justify-self-stretch': {
|
||||
'justify-self': 'stretch',
|
||||
},
|
||||
},
|
||||
variants('justifySelf')
|
||||
)
|
||||
}
|
||||
}
|
||||
34
src/plugins/placeContent.js
Normal file
34
src/plugins/placeContent.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
export default function() {
|
||||
return function({ addUtilities, variants, target }) {
|
||||
if (target('placeContent') === 'ie11') {
|
||||
return
|
||||
}
|
||||
|
||||
addUtilities(
|
||||
{
|
||||
'.place-content-center': {
|
||||
'place-content': 'center',
|
||||
},
|
||||
'.place-content-start': {
|
||||
'place-content': 'start',
|
||||
},
|
||||
'.place-content-end': {
|
||||
'place-content': 'end',
|
||||
},
|
||||
'.place-content-between': {
|
||||
'place-content': 'space-between',
|
||||
},
|
||||
'.place-content-around': {
|
||||
'place-content': 'space-around',
|
||||
},
|
||||
'.place-content-evenly': {
|
||||
'place-content': 'space-evenly',
|
||||
},
|
||||
'.place-content-stretch': {
|
||||
'place-content': 'stretch',
|
||||
},
|
||||
},
|
||||
variants('placeContent')
|
||||
)
|
||||
}
|
||||
}
|
||||
28
src/plugins/placeItems.js
Normal file
28
src/plugins/placeItems.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export default function() {
|
||||
return function({ addUtilities, variants, target }) {
|
||||
if (target('placeItems') === 'ie11') {
|
||||
return
|
||||
}
|
||||
|
||||
addUtilities(
|
||||
{
|
||||
'.place-items-auto': {
|
||||
'place-items': 'auto',
|
||||
},
|
||||
'.place-items-start': {
|
||||
'place-items': 'start',
|
||||
},
|
||||
'.place-items-end': {
|
||||
'place-items': 'end',
|
||||
},
|
||||
'.place-items-center': {
|
||||
'place-items': 'center',
|
||||
},
|
||||
'.place-items-stretch': {
|
||||
'place-items': 'stretch',
|
||||
},
|
||||
},
|
||||
variants('placeItems')
|
||||
)
|
||||
}
|
||||
}
|
||||
28
src/plugins/placeSelf.js
Normal file
28
src/plugins/placeSelf.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export default function() {
|
||||
return function({ addUtilities, variants, target }) {
|
||||
if (target('placeSelf') === 'ie11') {
|
||||
return
|
||||
}
|
||||
|
||||
addUtilities(
|
||||
{
|
||||
'.place-self-auto': {
|
||||
'place-self': 'auto',
|
||||
},
|
||||
'.place-self-start': {
|
||||
'place-self': 'start',
|
||||
},
|
||||
'.place-self-end': {
|
||||
'place-self': 'end',
|
||||
},
|
||||
'.place-self-center': {
|
||||
'place-self': 'center',
|
||||
},
|
||||
'.place-self-stretch': {
|
||||
'place-self': 'stretch',
|
||||
},
|
||||
},
|
||||
variants('placeSelf')
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue