mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Add CSS grid utilities
This commit is contained in:
parent
009f52d07f
commit
d882d8d4fc
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -71,6 +71,16 @@ import transformOrigin from './plugins/transformOrigin'
|
||||
import scale from './plugins/scale'
|
||||
import rotate from './plugins/rotate'
|
||||
import translate from './plugins/translate'
|
||||
import gridTemplateColumns from './plugins/gridTemplateColumns'
|
||||
import gridColumnGap from './plugins/gridColumnGap'
|
||||
import gridColumn from './plugins/gridColumn'
|
||||
import gridColumnStart from './plugins/gridColumnStart'
|
||||
import gridColumnEnd from './plugins/gridColumnEnd'
|
||||
import gridTemplateRows from './plugins/gridTemplateRows'
|
||||
import gridRowGap from './plugins/gridRowGap'
|
||||
import gridRow from './plugins/gridRow'
|
||||
import gridRowStart from './plugins/gridRowStart'
|
||||
import gridRowEnd from './plugins/gridRowEnd'
|
||||
|
||||
import configurePlugins from './util/configurePlugins'
|
||||
|
||||
@ -144,6 +154,16 @@ export default function({ corePlugins: corePluginConfig }) {
|
||||
wordBreak,
|
||||
width,
|
||||
zIndex,
|
||||
gridTemplateColumns,
|
||||
gridColumnGap,
|
||||
gridColumn,
|
||||
gridColumnStart,
|
||||
gridColumnEnd,
|
||||
gridTemplateRows,
|
||||
gridRowGap,
|
||||
gridRow,
|
||||
gridRowStart,
|
||||
gridRowEnd,
|
||||
transform,
|
||||
transformOrigin,
|
||||
scale,
|
||||
|
||||
@ -17,6 +17,9 @@ export default function() {
|
||||
'.inline-flex': {
|
||||
display: 'inline-flex',
|
||||
},
|
||||
'.grid': {
|
||||
display: 'grid',
|
||||
},
|
||||
'.table': {
|
||||
display: 'table',
|
||||
},
|
||||
|
||||
5
src/plugins/gridColumn.js
Normal file
5
src/plugins/gridColumn.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridColumn', [['col', ['gridColumn']]])
|
||||
}
|
||||
5
src/plugins/gridColumnEnd.js
Normal file
5
src/plugins/gridColumnEnd.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridColumnEnd', [['col-end', ['gridColumnEnd']]])
|
||||
}
|
||||
5
src/plugins/gridColumnGap.js
Normal file
5
src/plugins/gridColumnGap.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridColumnGap', [['col-gap', ['gridColumnGap']]])
|
||||
}
|
||||
5
src/plugins/gridColumnStart.js
Normal file
5
src/plugins/gridColumnStart.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridColumnStart', [['col-start', ['gridColumnStart']]])
|
||||
}
|
||||
5
src/plugins/gridRow.js
Normal file
5
src/plugins/gridRow.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridRow', [['row', ['gridRow']]])
|
||||
}
|
||||
5
src/plugins/gridRowEnd.js
Normal file
5
src/plugins/gridRowEnd.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridRowEnd', [['row-end', ['gridRowEnd']]])
|
||||
}
|
||||
5
src/plugins/gridRowGap.js
Normal file
5
src/plugins/gridRowGap.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridRowGap', [['row-gap', ['gridRowGap']]])
|
||||
}
|
||||
5
src/plugins/gridRowStart.js
Normal file
5
src/plugins/gridRowStart.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridRowStart', [['row-start', ['gridRowStart']]])
|
||||
}
|
||||
5
src/plugins/gridTemplateColumns.js
Normal file
5
src/plugins/gridTemplateColumns.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridTemplateColumns', [['grid-cols', ['gridTemplateColumns']]])
|
||||
}
|
||||
5
src/plugins/gridTemplateRows.js
Normal file
5
src/plugins/gridTemplateRows.js
Normal file
@ -0,0 +1,5 @@
|
||||
import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
|
||||
export default function() {
|
||||
return createUtilityPlugin('gridTemplateRows', [['grid-rows', ['gridTemplateRows']]])
|
||||
}
|
||||
@ -405,6 +405,70 @@ module.exports = {
|
||||
'40': '40',
|
||||
'50': '50',
|
||||
},
|
||||
gridTemplateColumns: {
|
||||
'1': 'repeat(1, 1fr)',
|
||||
'2': 'repeat(2, 1fr)',
|
||||
'3': 'repeat(3, 1fr)',
|
||||
'4': 'repeat(4, 1fr)',
|
||||
'5': 'repeat(5, 1fr)',
|
||||
'6': 'repeat(6, 1fr)',
|
||||
'7': 'repeat(7, 1fr)',
|
||||
'8': 'repeat(8, 1fr)',
|
||||
'9': 'repeat(9, 1fr)',
|
||||
'10': 'repeat(10, 1fr)',
|
||||
'11': 'repeat(11, 1fr)',
|
||||
'12': 'repeat(12, 1fr)',
|
||||
},
|
||||
gridColumn: {
|
||||
'span-1': 'span 1 / span 1',
|
||||
'span-2': 'span 2 / span 2',
|
||||
'span-3': 'span 3 / span 3',
|
||||
'span-4': 'span 4 / span 4',
|
||||
'span-5': 'span 5 / span 5',
|
||||
'span-6': 'span 6 / span 6',
|
||||
'span-7': 'span 7 / span 7',
|
||||
'span-8': 'span 8 / span 8',
|
||||
'span-9': 'span 9 / span 9',
|
||||
'span-10': 'span 10 / span 10',
|
||||
'span-11': 'span 11 / span 11',
|
||||
'span-12': 'span 12 / span 12',
|
||||
},
|
||||
gridColumnStart: {
|
||||
'1': '1',
|
||||
'2': '2',
|
||||
'3': '3',
|
||||
'4': '4',
|
||||
'5': '5',
|
||||
'6': '6',
|
||||
'7': '7',
|
||||
'8': '8',
|
||||
'9': '9',
|
||||
'10': '10',
|
||||
'11': '11',
|
||||
'12': '12',
|
||||
'13': '13',
|
||||
},
|
||||
gridColumnEnd: {
|
||||
'1': '1',
|
||||
'2': '2',
|
||||
'3': '3',
|
||||
'4': '4',
|
||||
'5': '5',
|
||||
'6': '6',
|
||||
'7': '7',
|
||||
'8': '8',
|
||||
'9': '9',
|
||||
'10': '10',
|
||||
'11': '11',
|
||||
'12': '12',
|
||||
'13': '13',
|
||||
},
|
||||
gridColumnGap: theme => theme('spacing'),
|
||||
gridTemplateRows: {},
|
||||
gridRow: {},
|
||||
gridRowStart: {},
|
||||
gridRowEnd: {},
|
||||
gridRowGap: theme => theme('spacing'),
|
||||
transformOrigin: {
|
||||
center: 'center',
|
||||
top: 'top',
|
||||
@ -513,6 +577,16 @@ module.exports = {
|
||||
width: ['responsive'],
|
||||
wordBreak: ['responsive'],
|
||||
zIndex: ['responsive'],
|
||||
gridTemplateColumns: ['responsive'],
|
||||
gridColumnGap: ['responsive'],
|
||||
gridColumn: ['responsive'],
|
||||
gridColumnStart: ['responsive'],
|
||||
gridColumnEnd: ['responsive'],
|
||||
gridTemplateRows: ['responsive'],
|
||||
gridRowGap: ['responsive'],
|
||||
gridRow: ['responsive'],
|
||||
gridRowStart: ['responsive'],
|
||||
gridRowEnd: ['responsive'],
|
||||
transform: ['responsive'],
|
||||
transformOrigin: ['responsive'],
|
||||
scale: ['responsive', 'hover', 'focus'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user