-
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f9be00
commit 4cd09bb
Showing
55 changed files
with
1,524 additions
and
21,499 deletions.
There are no files selected for viewing
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
This file was deleted.
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
File renamed without changes.
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,130 @@ | ||
module.exports = { | ||
theme: { | ||
aspectRatio: { | ||
2: '2', | ||
4: '4', | ||
6: '6', | ||
}, | ||
}, | ||
plugins: [ | ||
addUtilitiesTest, | ||
addUtilitiesTest2, | ||
addComponentsTest, | ||
addComponentsTestElementPrefixes, | ||
addComponentsTestElementScreenReplacements, | ||
pluginBaseSelectors, | ||
], | ||
} | ||
|
||
function addUtilitiesTest({ addUtilities, theme }) { | ||
const newUtilities = { | ||
'.type-sm': { | ||
fontSize: theme('fontSize.sm'), | ||
fontWeight: theme('fontWeight.medium'), | ||
lineHeight: theme('lineHeight.tight'), | ||
}, | ||
} | ||
addUtilities(newUtilities) | ||
} | ||
|
||
function addUtilitiesTest2({ addUtilities }) { | ||
const newUtilities = { | ||
'.skew-10deg': { | ||
transform: 'skewY(-10deg)', | ||
}, | ||
'.skew-15deg': { | ||
transform: 'skewY(-15deg)', | ||
}, | ||
} | ||
|
||
addUtilities(newUtilities) | ||
} | ||
|
||
function addComponentsTest({ addComponents }) { | ||
const buttons = { | ||
'.btn': { | ||
padding: '.5rem 1rem', | ||
borderRadius: '.25rem', | ||
fontWeight: '600', | ||
}, | ||
'.btn-blue': { | ||
backgroundColor: '#3490dc', | ||
color: '#fff', | ||
'&:hover': { | ||
backgroundColor: '#2779bd', | ||
}, | ||
}, | ||
'.btn-red': { | ||
backgroundColor: '#e3342f', | ||
color: '#fff', | ||
'&:hover': { | ||
backgroundColor: '#cc1f1a', | ||
}, | ||
}, | ||
} | ||
|
||
addComponents(buttons) | ||
} | ||
|
||
function addComponentsTestElementPrefixes({ addComponents }) { | ||
const styles = [ | ||
{ | ||
'.prefixes': { | ||
h1: { | ||
margin: 'auto', | ||
marginRight: '10px', | ||
}, | ||
'h2:hover': { | ||
color: 'red', | ||
}, | ||
'h3:hover, h3:active': { | ||
color: 'green', | ||
}, | ||
':focus': { | ||
display: 'none', | ||
}, | ||
}, | ||
}, | ||
] | ||
|
||
addComponents(styles) | ||
} | ||
|
||
function addComponentsTestElementScreenReplacements({ addComponents }) { | ||
const styles = [ | ||
{ | ||
'.screenies': { | ||
'@screen sm': { | ||
display: 'block', | ||
}, | ||
'@screen lg': { | ||
display: 'inline-block', | ||
}, | ||
'@screen md': { | ||
display: 'flex', | ||
}, | ||
'@screen xl': { | ||
h1: { | ||
marginTop: '50px', | ||
'&:hover, &:focus': { | ||
color: 'blue', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
] | ||
|
||
addComponents(styles) | ||
} | ||
|
||
// tests introducing a config item and using the items as base selectors | ||
function pluginBaseSelectors({ addComponents, theme, e }) { | ||
const values = theme('aspectRatio') | ||
|
||
const baseSelectors = Object.entries(values) | ||
.map(([key]) => `.${e(`aspect-test-${key}`)}`) | ||
.join(',\n') | ||
|
||
addComponents([{ [baseSelectors]: { content: 'test' } }]) | ||
} |
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ tw`bg-gradient-to-b` | |
tw`bg-gradient-to-bl` | ||
tw`bg-gradient-to-l` | ||
tw`bg-gradient-to-tl` | ||
|
||
tw`bg-[image:custom]` |
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 |
---|---|---|
|
@@ -6,3 +6,5 @@ theme`backgroundSize` | |
tw`bg-auto` | ||
tw`bg-cover` | ||
tw`bg-contain` | ||
|
||
tw`bg-[length:var(--value)]` |
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
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
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
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,28 @@ | ||
module.exports = { | ||
theme: { | ||
container: { | ||
padding: { | ||
DEFAULT: ['1rem', '2rem'], | ||
sm: ['2rem'], | ||
lg: '4rem', | ||
xl: '6rem', | ||
object: '8rem', | ||
'object-width': '10rem', | ||
'object-min-max': '12rem', | ||
}, | ||
margin: { | ||
DEFAULT: ['2rem', '3rem'], | ||
sm: ['auto'], | ||
lg: '5rem', | ||
xl: '7rem', | ||
}, | ||
}, | ||
extend: { | ||
screens: { | ||
object: { min: '968px' }, | ||
'object-width': { 'min-width': '992px' }, | ||
'object-min-max': { min: '1200px', max: '1600px' }, | ||
}, | ||
}, | ||
}, | ||
} |
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
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ tw`transition-shadow` | |
tw`transition-transform` | ||
|
||
tw`transition-[height]` | ||
|
||
tw`transition-[lookup:green]` |
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
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
Oops, something went wrong.