Skip to content

Commit 27f466b

Browse files
grzuyeldano
andauthored
Upgrade tailwindcss to v2 (#157)
* Upgrade tailwindcss from 1.1.3 to 1.9.6 * Upgrade tailwindcss from 1.9.6 to 2.2.16 * Use new tailwindcss teal shades * Improve text/background contrast for ex/top version text after tailwindcss update * Make some grays lighter for better contrast Co-authored-by: Daniel Gomez de Souza <daniel@wyeworks.com>
1 parent 01a8042 commit 27f466b

9 files changed

Lines changed: 734 additions & 183 deletions

File tree

assets/css/app.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ body {
2626
}
2727

2828
.contextual-help-doc pre {
29-
background-color: #234e52; /* teal-900 */
29+
@apply bg-teal-900;
30+
@apply text-teal-300;
3031
border-radius: 4px;
31-
color: #81e6d9; /* teal-300 */
3232
margin-bottom: 0.5rem;
3333
padding: 0.25rem 0.5rem;
3434
white-space: pre-wrap;
3535
}
3636

3737
.contextual-help-doc p > code {
38-
background-color: #234e52; /* teal-900 */
38+
@apply bg-teal-900;
39+
@apply text-teal-300;
3940
border-radius: 2px;
40-
color: #81e6d9; /* teal-300 */
4141
padding: 0.25rem;
4242
}

assets/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"dependencies": {
1010
"phoenix": "file:../deps/phoenix",
1111
"phoenix_html": "file:../deps/phoenix_html",
12-
"phoenix_live_view": "file:../deps/phoenix_live_view",
13-
"tailwindcss": "^1.1.2"
12+
"phoenix_live_view": "file:../deps/phoenix_live_view"
1413
},
1514
"devDependencies": {
15+
"autoprefixer": "^10.3.6",
1616
"@babel/core": "^7.0.0",
1717
"@babel/preset-env": "^7.0.0",
1818
"babel-loader": "^8.0.0",
@@ -21,7 +21,9 @@
2121
"hard-source-webpack-plugin": "^0.13.1",
2222
"mini-css-extract-plugin": "^0.4.0",
2323
"optimize-css-assets-webpack-plugin": "^5.0.1",
24-
"postcss-loader": "^3.0.0",
24+
"postcss": "^8.3.8",
25+
"postcss-loader": "^4.0.0",
26+
"tailwindcss": "^2.2.16",
2527
"terser-webpack-plugin": "^1.1.0",
2628
"webpack": "4.4.0",
2729
"webpack-cli": "^3.3.2"

assets/postcss.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
plugins: [
3-
require('tailwindcss'),
4-
require('autoprefixer')
5-
]
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
}
66
};

assets/tailwind.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const colors = require('tailwindcss/colors')
2+
3+
module.exports = {
4+
purge: [],
5+
darkMode: false, // or 'media' or 'class'
6+
theme: {
7+
extend: {
8+
colors: {
9+
teal: colors.teal
10+
}
11+
},
12+
},
13+
variants: {
14+
extend: {},
15+
},
16+
plugins: [],
17+
}

assets/webpack.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,7 @@ module.exports = (_env, options) => {
3939
use: [
4040
MiniCssExtractPlugin.loader,
4141
'css-loader',
42-
{
43-
loader: 'postcss-loader',
44-
options: {
45-
config: {
46-
path: './postcss.config.js'
47-
}
48-
}
49-
}
42+
'postcss-loader'
5043
],
5144
}
5245
]

0 commit comments

Comments
 (0)