Skip to content

Commit 664468e

Browse files
committed
Upgrade ember-cli-tailwind
1 parent 7d13da8 commit 664468e

25 files changed

+294
-426
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* You can create Tailwind components using @apply here.
3+
*
4+
* Feel free to rename this file, define multiple components here, or make
5+
* any other files in this directory.
6+
7+
* Here's an example:
8+
**/
9+
10+
/*
11+
.btn-blue {
12+
@apply .bg-blue .text-white .font-bold .py-2 .px-4 .rounded;
13+
}
14+
.btn-blue:hover {
15+
@apply .bg-blue-dark;
16+
}
17+
*/
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import colors from './colors';
2+
3+
/*
4+
|-----------------------------------------------------------------------------
5+
| Background colors https://tailwindcss.com/docs/background-color
6+
|-----------------------------------------------------------------------------
7+
|
8+
| Here is where you define your background colors. By default these use
9+
| the color palette we defined above, however you're welcome to set
10+
| these independently if that makes sense for your project.
11+
|
12+
| Class name: .bg-{color}
13+
|
14+
*/
15+
16+
export default colors;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
|-----------------------------------------------------------------------------
3+
| Background sizes https://tailwindcss.com/docs/background-size
4+
|-----------------------------------------------------------------------------
5+
|
6+
| Here is where you define your background sizes. We provide some common
7+
| values that are useful in most projects, but feel free to add other sizes
8+
| that are specific to your project here as well.
9+
|
10+
| Class name: .bg-{size}
11+
|
12+
*/
13+
14+
export default {
15+
auto: 'auto',
16+
cover: 'cover',
17+
contain: 'contain'
18+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import colors from './colors';
2+
3+
/*
4+
|-----------------------------------------------------------------------------
5+
| Border colors https://tailwindcss.com/docs/border-color
6+
|-----------------------------------------------------------------------------
7+
|
8+
| Here is where you define your border colors. By default these use the
9+
| color palette we defined above, however you're welcome to set these
10+
| independently if that makes sense for your project.
11+
|
12+
| Take note that border colors require a special "default" value set
13+
| as well. This is the color that will be used when you do not
14+
| specify a border color.
15+
|
16+
| Class name: .border-{color}
17+
|
18+
*/
19+
20+
export default Object.assign({ default: colors['grey-light'] }, colors);

addon/tailwind/config/border-widths.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ export default {
1616
'0': '0',
1717
'2': '2px',
1818
'4': '4px',
19-
'8': '8px',
19+
'8': '8px'
2020
};

addon/tailwind/config/font-weights.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
*/
1414

1515
export default {
16-
'hairline': 100,
17-
'thin': 200,
18-
'light': 300,
19-
'normal': 400,
20-
'medium': 500,
21-
'semibold': 600,
22-
'bold': 700,
23-
'extrabold': 800,
24-
'black': 900,
16+
hairline: 100,
17+
thin: 200,
18+
light: 300,
19+
normal: 400,
20+
medium: 500,
21+
semibold: 600,
22+
bold: 700,
23+
extrabold: 800,
24+
black: 900
2525
};

addon/tailwind/config/fonts.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
export default {
20-
'sans': [
20+
sans: [
2121
'system-ui',
2222
'BlinkMacSystemFont',
2323
'-apple-system',
@@ -29,9 +29,9 @@ export default {
2929
'Fira Sans',
3030
'Droid Sans',
3131
'Helvetica Neue',
32-
'sans-serif',
32+
'sans-serif'
3333
],
34-
'serif': [
34+
serif: [
3535
'Constantia',
3636
'Lucida Bright',
3737
'Lucidabright',
@@ -41,14 +41,14 @@ export default {
4141
'Bitstream Vera Serif',
4242
'Liberation Serif',
4343
'Georgia',
44-
'serif',
44+
'serif'
4545
],
46-
'mono': [
47-
'Monaco',
46+
mono: [
4847
'Menlo',
48+
'Monaco',
4949
'Consolas',
5050
'Liberation Mono',
5151
'Courier New',
52-
'monospace',
52+
'monospace'
5353
]
5454
};

addon/tailwind/config/height.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
*/
1515

1616
export default {
17-
'auto': 'auto',
18-
'px': '1px',
17+
auto: 'auto',
18+
px: '1px',
1919
'1': '0.25rem',
2020
'2': '0.5rem',
2121
'3': '0.75rem',
@@ -29,6 +29,6 @@ export default {
2929
'32': '8rem',
3030
'48': '12rem',
3131
'64': '16rem',
32-
'full': '100%',
33-
'screen': '100vh'
32+
full: '100%',
33+
screen: '100vh'
3434
};

addon/tailwind/config/max-height.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
*/
1414

1515
export default {
16-
'full': '100%',
17-
'screen': '100vh',
16+
full: '100%',
17+
screen: '100vh'
1818
};

addon/tailwind/config/min-height.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
export default {
1616
'0': '0',
17-
'full': '100%',
18-
'screen': '100vh'
17+
full: '100%',
18+
screen: '100vh'
1919
};

addon/tailwind/config/min-width.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
export default {
1616
'0': '0',
17-
'full': '100%',
17+
full: '100%'
1818
};

addon/tailwind/config/opacity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ export default {
1616
'25': '.25',
1717
'50': '.5',
1818
'75': '.75',
19-
'100': '1',
19+
'100': '1'
2020
};

addon/tailwind/config/screens.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*/
1919

2020
export default {
21-
'sm': '576px',
22-
'md': '768px',
23-
'lg': '992px',
24-
'xl': '1200px',
21+
sm: '576px',
22+
md: '768px',
23+
lg: '992px',
24+
xl: '1200px'
2525
};

addon/tailwind/config/svg-fill.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
*/
1414

1515
export default {
16-
'current': 'currentColor',
16+
current: 'currentColor'
1717
};

addon/tailwind/config/svg-stroke.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
*/
1414

1515
export default {
16-
'current': 'currentColor'
16+
current: 'currentColor'
1717
};

addon/tailwind/config/tailwind.js

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
'use strict';
2-
31
import colors from './colors';
42
import screens from './screens';
53
import fonts from './fonts';
64
import textSizes from './text-sizes';
75
import fontWeights from './font-weights';
86
import leading from './line-height';
97
import tracking from './letter-spacing';
8+
import textColors from './text-colors';
9+
import backgroundColors from './background-colors';
10+
import backgroundSize from './background-size';
1011
import borderWidths from './border-widths';
12+
import borderColors from './border-colors';
1113
import borderRadius from './border-radius';
1214
import width from './width';
1315
import height from './height';
@@ -25,18 +27,18 @@ import svgFill from './svg-fill';
2527
import svgStroke from './svg-stroke';
2628

2729
export default {
28-
2930
colors,
3031
screens,
3132
fonts,
3233
textSizes,
3334
fontWeights,
3435
leading,
3536
tracking,
36-
textColors: colors,
37-
backgroundColors: colors,
37+
textColors,
38+
backgroundColors,
39+
backgroundSize,
3840
borderWidths,
39-
borderColors: Object.assign({ default: colors['grey-light'] }, colors),
41+
borderColors,
4042
borderRadius,
4143
width,
4244
height,
@@ -101,6 +103,26 @@ export default {
101103
zIndex: ['responsive'],
102104
},
103105

106+
/*
107+
|-----------------------------------------------------------------------------
108+
| Plugins https://tailwindcss.com/docs/plugins
109+
|-----------------------------------------------------------------------------
110+
|
111+
| Here is where you can register any plugins you'd like to use in your
112+
| project. Tailwind's built-in `container` plugin is enabled by default to
113+
| give you a Bootstrap-style responsive container component out of the box.
114+
|
115+
| Be sure to view the complete plugin documentation to learn more about how
116+
| the plugin system works.
117+
|
118+
*/
119+
120+
plugins: [
121+
],
122+
123+
/*
124+
|-----------------------------------------------------------------------------
125+
104126
/*
105127
|-----------------------------------------------------------------------------
106128
| Advanced Options https://tailwindcss.com/docs/configuration#options

addon/tailwind/config/text-colors.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import colors from './colors';
2+
3+
/*
4+
|-----------------------------------------------------------------------------
5+
| Text colors https://tailwindcss.com/docs/text-color
6+
|-----------------------------------------------------------------------------
7+
|
8+
| Here is where you define your text colors. By default these use the
9+
| color palette we defined above, however you're welcome to set these
10+
| independently if that makes sense for your project.
11+
|
12+
| Class name: .text-{color}
13+
|
14+
*/
15+
16+
export default colors;

addon/tailwind/config/z-index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
*/
1313

1414
export default {
15-
'auto': 'auto',
15+
auto: 'auto',
1616
'0': 0,
1717
'10': 10,
1818
'20': 20,
1919
'30': 30,
2020
'40': 40,
21-
'50': 50,
21+
'50': 50
2222
};

0 commit comments

Comments
 (0)