Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make lib compatible with tailwindcss 1.8 #52

Merged
merged 8 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"rollup-plugin-terser": "^5.3.0",
"semver": "^7.3.2",
"standard-version": "^8.0.0",
"tailwindcss": "^1.7.6",
"tailwindcss": "^1.8.7",
"ts-jest": "~23.10.0",
"typescript": "^3.1.4"
}
Expand Down
47 changes: 47 additions & 0 deletions src/cli/default-classes/Flexbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@ const alignContent = [

const alignSelf = ['self-auto', 'self-start', 'self-center', 'self-end', 'self-stretch'];

const placeContent = [
'place-content-start',
'place-content-center',
'place-content-end',
'place-content-between',
'place-content-around',
'place-content-evenly',
'place-content-stretch',
];

const placeItems = [
'place-items-auto',
'place-items-start',
'place-items-center',
'place-items-end',
'place-items-stretch',
];

const placeSelf = [
'place-self-auto',
'place-self-start',
'place-self-center',
'place-self-end',
'place-self-stretch',
];

const justifyContent = [
'justify-start',
'justify-center',
Expand All @@ -22,6 +48,22 @@ const justifyContent = [
'justify-around',
];

const justifyItems = [
'justify-items-auto',
'justify-items-start',
'justify-items-center',
'justify-items-end',
'justify-items-stretch',
];

const justifySelf = [
'justify-self-auto',
'justify-self-start',
'justify-self-center',
'justify-self-end',
'justify-self-stretch',
];

const flex = ['flex-initial', 'flex-1', 'flex-auto', 'flex-none'];

const flexGrow = ['flex-grow', 'flex-grow-0'];
Expand Down Expand Up @@ -52,7 +94,12 @@ export const FlexBox = {
alignItems,
alignContent,
alignSelf,
placeContent,
placeItems,
placeSelf,
justifyContent,
justifyItems,
justifySelf,
flex,
flexGrow,
flexShrink,
Expand Down
13 changes: 13 additions & 0 deletions src/cli/default-classes/Typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ const fontWeight = [
'font-black',
];

const fontVariantNumeric = [
'normal-nums',
'ordinal',
'slashed-zero',
'lining-nums',
'oldstyle-nums',
'proportional-nums',
'tabular-nums',
'diagonal-fractions',
'stacked-fractions',
];

const letterSpacing = [
'tracking-tighter',
'tracking-tight',
Expand Down Expand Up @@ -298,6 +310,7 @@ export const Typography = {
fontSmoothing,
fontStyle,
fontWeight,
fontVariantNumeric,
letterSpacing,
lineHeight,
listStyleType,
Expand Down
6 changes: 6 additions & 0 deletions src/cli/utils/defaultTailwindConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,14 @@ export const defaultVariants: Record<string, string[]> = {
fontFamily: ['responsive'],
fontSize: ['responsive'],
fontSmoothing: ['responsive'],
fontVariantNumeric: ['responsive'],
fontStyle: ['responsive'],
fontWeight: ['responsive', 'hover', 'focus'],
height: ['responsive'],
inset: ['responsive'],
justifyContent: ['responsive'],
justifyItems: ['responsive'],
justifySelf: ['responsive'],
letterSpacing: ['responsive'],
lineHeight: ['responsive'],
listStylePosition: ['responsive'],
Expand All @@ -724,6 +727,9 @@ export const defaultVariants: Record<string, string[]> = {
overflow: ['responsive'],
overscrollBehavior: ['responsive'],
padding: ['responsive'],
placeContent: ['responsive'],
placeItems: ['responsive'],
placeSelf: ['responsive'],
placeholderColor: ['responsive', 'focus'],
placeholderOpacity: ['responsive', 'focus'],
pointerEvents: ['responsive'],
Expand Down
Loading