forked from tailwindlabs/tailwindcss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request tailwindlabs#1274 from tailwindcss/grid-utilities
Add CSS Grid utilities
- Loading branch information
Showing
17 changed files
with
3,486 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('columnGap', [['col-gap', ['gridColumnGap', 'columnGap']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gap', [['gap', ['gridGap', 'gap']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default function() { | ||
return function({ addUtilities, variants }) { | ||
addUtilities( | ||
{ | ||
'.grid-flow-row': { gridAutoFlow: 'row' }, | ||
'.grid-flow-col': { gridAutoFlow: 'column' }, | ||
'.grid-flow-row-dense': { gridAutoFlow: 'row dense' }, | ||
'.grid-flow-col-dense': { gridAutoFlow: 'column dense' }, | ||
}, | ||
variants('gridAutoFlow') | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridColumn', [['col', ['gridColumn']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridColumnEnd', [['col-end', ['gridColumnEnd']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridColumnStart', [['col-start', ['gridColumnStart']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridRow', [['row', ['gridRow']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridRowEnd', [['row-end', ['gridRowEnd']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridRowStart', [['row-start', ['gridRowStart']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridTemplateColumns', [['grid-cols', ['gridTemplateColumns']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('gridTemplateRows', [['grid-rows', ['gridTemplateRows']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import createUtilityPlugin from '../util/createUtilityPlugin' | ||
|
||
export default function() { | ||
return createUtilityPlugin('rowGap', [['row-gap', ['gridRowGap', 'rowGap']]]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters