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:
Adam Wathan 2020-09-04 10:54:13 -04:00 • committed by GitHub
parent b3270a5b31
commit ff013c5e9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 2729 additions and 304 deletions

View file

@ -17,6 +17,9 @@ export default function() {
'.content-around': {
'align-content': 'space-around',
},
'.content-evenly': {
'align-content': 'space-evenly',
},
},
variants('alignContent')
)

View 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')
)
}
}

View 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')
)
}
}

View 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
View 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
View 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')
)
}
}