Migrate Tailwind to v4
This commit is contained in:
Generated
+511
-1105
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -15,15 +15,15 @@
|
|||||||
"@vercel/speed-insights": "^1.1.0",
|
"@vercel/speed-insights": "^1.1.0",
|
||||||
"motion": "^11.16.0",
|
"motion": "^11.16.0",
|
||||||
"next": "15.2.4",
|
"next": "15.2.4",
|
||||||
"sharp": "^0.33.5",
|
|
||||||
"react": "19.1.0",
|
"react": "19.1.0",
|
||||||
"react-dom": "19.1.0"
|
"react-dom": "19.1.0",
|
||||||
|
"sharp": "^0.33.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^10.4.20",
|
"@tailwindcss/postcss": "^4.1.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.2.4",
|
"eslint-config-next": "15.2.4",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"tailwindcss": "^3.4.17"
|
"tailwindcss": "^4.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
'@tailwindcss/postcss': {},
|
||||||
autoprefixer: {},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default function Footer() {
|
|||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<p>Copyright © Te Atatu Computer Repair, 2025</p>
|
<p>Copyright © Te Atatu Computer Repair, {new Date().getFullYear()}</p>
|
||||||
</footer>
|
</footer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default function Navbar() {
|
|||||||
useOutsideAlerter(wrapperRef);
|
useOutsideAlerter(wrapperRef);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className={`${styles.navbar} shadow`}>
|
<nav className={`${styles.navbar} shadow-sm`}>
|
||||||
<div className={`${styles.container} container mx-auto`} ref={wrapperRef}>
|
<div className={`${styles.container} container mx-auto`} ref={wrapperRef}>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default function Home() {
|
|||||||
|
|
||||||
<p className={styles.sm}>* required</p>
|
<p className={styles.sm}>* required</p>
|
||||||
|
|
||||||
<input type="submit" value="Submit" required />
|
<input type="submit" value="Submit" required className="text-white bg-sky-800 hover:bg-sky-700 transition" />
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,16 +19,11 @@
|
|||||||
|
|
||||||
/* Style the submit button */
|
/* Style the submit button */
|
||||||
.form input[type="submit"] {
|
.form input[type="submit"] {
|
||||||
background-color: var(--accent);
|
|
||||||
color: white;
|
|
||||||
padding: 1em 1.75em;
|
padding: 1em 1.75em;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.form input[type="submit"]:hover {
|
|
||||||
background-color: var(--accent-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.sm {
|
.sm {
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
|
|||||||
+23
-3
@@ -1,3 +1,23 @@
|
|||||||
@tailwind base;
|
@import 'tailwindcss';
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
@utility container {
|
||||||
|
padding-inline: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
||||||
|
so we've added these compatibility styles to make sure everything still
|
||||||
|
looks the same as it did with Tailwind CSS v3.
|
||||||
|
|
||||||
|
If we ever want to remove these styles, we need to add an explicit border
|
||||||
|
color utility to any element that depends on these defaults.
|
||||||
|
*/
|
||||||
|
@layer base {
|
||||||
|
*,
|
||||||
|
::after,
|
||||||
|
::before,
|
||||||
|
::backdrop,
|
||||||
|
::file-selector-button {
|
||||||
|
border-color: var(--color-gray-200, currentColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
module.exports = {
|
|
||||||
content: [
|
|
||||||
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
||||||
],
|
|
||||||
theme: {
|
|
||||||
extend: {},
|
|
||||||
container: {
|
|
||||||
padding: '1rem',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user