Skip to content

Commit 2154315

Browse files
authored
Merge pull request #10 from lukdog/upate-tailwind
Tailwind update to v4
2 parents 616c337 + 219dbe8 commit 2154315

File tree

6 files changed

+266
-308
lines changed

6 files changed

+266
-308
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Build with Next.js
7272
run: ${{ steps.detect-package-manager.outputs.runner }} next build
7373
- name: Upload artifact
74-
uses: actions/upload-pages-artifact@v1
74+
uses: actions/upload-pages-artifact@v3
7575
with:
7676
path: ./out
7777

components/herobanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function HeroBanner({ titles, profilePicUrl }: HeroBannerProps) {
3030

3131
<div className="-mr-30 relative mt-20 hidden w-full md:w-1/2 lg:block">
3232
<div className="w-3/4 ">
33-
<Image src={profilePicUrl} height="1333" width="1000" alt="avatar" className="rounded shadow" />
33+
<Image src={profilePicUrl} height="600" width="600" alt="avatar" className="rounded shadow" />
3434
<div className="mt-4 flex flex-row justify-between">
3535
<div className="flex flex-row space-x-4">
3636
<svg

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"build": "next build",
99
"start": "next start",
1010
"lint": "next lint",
11-
"export": "next export",
1211
"prettier-format": "prettier --config .prettierrc './**/*.ts*' --write"
1312
},
1413
"dependencies": {
@@ -18,18 +17,18 @@
1817
"react-rough-notation": "^1.0.3"
1918
},
2019
"devDependencies": {
20+
"@tailwindcss/postcss": "^4.0.0",
2121
"@types/node": "18.6.5",
2222
"@types/react": "18.0.17",
2323
"@types/react-dom": "18.0.6",
24-
"autoprefixer": "^10.4.12",
2524
"classnames": "^2.3.2",
2625
"eslint": "8.21.0",
2726
"eslint-config-next": "12.2.4",
2827
"husky": "^8.0.2",
2928
"postcss": "^8.4.31",
3029
"prettier": "^2.7.1",
31-
"prettier-plugin-tailwindcss": "^0.2.1",
32-
"tailwindcss": "^3.1.8",
30+
"prettier-plugin-tailwindcss": "^0.6.11",
31+
"tailwindcss": "^4.0.0",
3332
"typescript": "4.7.4"
3433
}
35-
}
34+
}

postcss.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module.exports = {
22
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
3+
'@tailwindcss/postcss': {},
54
},
65
}

styles/globals.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1+
@import 'tailwindcss';
12

2-
@tailwind base;
3-
@tailwind components;
4-
@tailwind utilities;
3+
@config '../tailwind.config.js';
4+
5+
/*
6+
The default border color has changed to `currentColor` in Tailwind CSS v4,
7+
so we've added these compatibility styles to make sure everything still
8+
looks the same as it did with Tailwind CSS v3.
9+
10+
If we ever want to remove these styles, we need to add an explicit border
11+
color utility to any element that depends on these defaults.
12+
*/
13+
@layer base {
14+
*,
15+
::after,
16+
::before,
17+
::backdrop,
18+
::file-selector-button {
19+
border-color: var(--color-gray-200, currentColor);
20+
}
21+
}

0 commit comments

Comments
 (0)