Skip to content

Commit 8f04330

Browse files
feat: tailwind 4 in svelte
1 parent d9f3c32 commit 8f04330

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

templates/sveltekit-starter/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"@sveltejs/adapter-static": "^3.0.6",
2020
"@sveltejs/kit": "^2.9.0",
2121
"@sveltejs/vite-plugin-svelte": "^5.0.1",
22+
"@tailwindcss/postcss": "^4.0.0",
2223
"@types/eslint": "^9.6.1",
23-
"autoprefixer": "^10.4.20",
2424
"eslint": "^9.16.0",
2525
"eslint-config-prettier": "^9.1.0",
2626
"eslint-plugin-svelte": "^2.46.1",
@@ -30,7 +30,7 @@
3030
"prettier-plugin-svelte": "^3.3.2",
3131
"svelte": "^5.7.1",
3232
"svelte-check": "^4.1.1",
33-
"tailwindcss": "^3.4.16",
33+
"tailwindcss": "^4.0.0",
3434
"tslib": "^2.8.1",
3535
"typescript": "^5.7.2",
3636
"typescript-eslint": "^8.17.0",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export default {
22
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {}
3+
'@tailwindcss/postcss': {}
54
}
65
};

templates/sveltekit-starter/src/app.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
2+
@config '../tailwind.config.js';
43

54
@font-face {
65
font-family: 'JetBrains Mono';

templates/sveltekit-starter/src/lib/components/Article.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
rel="noreferrer noopener"
1717
target="_blank"
1818
aria-label={ariaLabel}
19-
class="group flex flex-col py-3 px-4 border-black dark:border-lavender-blue-500 dark:hover:border-white border-[3px] rounded bg-white dark:bg-black dark:text-white transition-all shadow-[8px_8px_0px_rgba(0,0,0,1)] dark:shadow-[8px_8px_0px_#7888FF] dark:hover:shadow-[8px_8px_0px_#fff] hover:bg-lavender-blue-200 dark:hover:bg-black active:bg-lavender-blue-400 dark:active:bg-black active:shadow-none active:translate-x-[8px] active:translate-y-[8px]"
19+
class="group flex flex-col py-3 px-4 border-black dark:border-lavender-blue-500 dark:hover:border-white border-[3px] rounded-sm bg-white dark:bg-black dark:text-white transition-all shadow-[8px_8px_0px_rgba(0,0,0,1)] dark:shadow-[8px_8px_0px_#7888FF] dark:hover:shadow-[8px_8px_0px_#fff] hover:bg-lavender-blue-200 dark:hover:bg-black active:bg-lavender-blue-400 dark:active:bg-black active:shadow-none active:translate-x-[8px] active:translate-y-[8px]"
2020
>
2121
<h4
22-
class="sm:text-lg break-words font-extrabold mb-1 dark:text-lavender-blue-500 group-hover:dark:text-white"
22+
class="sm:text-lg break-words font-extrabold mb-1 dark:text-lavender-blue-500 dark:group-hover:text-white"
2323
>
2424
{title}
2525
</h4>

templates/sveltekit-starter/src/lib/components/Footer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<footer
2-
class="mx-auto max-w-screen-2xl py-16 md:pt-0 px-8 md:px-24 h-24 flex items-center justify-between md:justify-start md:gap-24 md:mt-12 dark:text-white"
2+
class="mx-auto max-w-(--breakpoint-2xl) py-16 md:pt-0 px-8 md:px-24 h-24 flex items-center justify-between md:justify-start md:gap-24 md:mt-12 dark:text-white"
33
>
44
<span class="flex gap-2 items-baseline">
55
<svg

templates/sveltekit-starter/src/lib/components/Hero.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
rel="noreferrer noopener"
1616
target="_blank"
1717
aria-label={ariaLabel}
18-
class="col-span-2 text-center text-lg font-extrabold bg-lavender-blue-500 dark:bg-white text-white dark:text-black dark:hover:text-white py-3 px-4 border-black dark:border-lavender-blue-500 dark:hover:border-white border-[3px] rounded transition-all shadow-[8px_8px_0px_rgba(0,0,0,1)] dark:shadow-[8px_8px_0px_#7888FF] dark:hover:shadow-[8px_8px_0px_#fff] hover:bg-lavender-blue-400 dark:hover:bg-black active:bg-lavender-blue-600 dark:active:bg-black active:shadow-none active:translate-x-[8px] active:translate-y-[8px]"
18+
class="col-span-2 text-center text-lg font-extrabold bg-lavender-blue-500 dark:bg-white text-white dark:text-black dark:hover:text-white py-3 px-4 border-black dark:border-lavender-blue-500 dark:hover:border-white border-[3px] rounded-sm transition-all shadow-[8px_8px_0px_rgba(0,0,0,1)] dark:shadow-[8px_8px_0px_#7888FF] dark:hover:shadow-[8px_8px_0px_#fff] hover:bg-lavender-blue-400 dark:hover:bg-black active:bg-lavender-blue-600 dark:active:bg-black active:shadow-none active:translate-x-[8px] active:translate-y-[8px]"
1919
>
2020
{@render children()}
2121
</a>

templates/sveltekit-starter/src/routes/+layout.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
</script>
2323

2424
<div class="relative isolate min-h-[100dvh]">
25-
<main class="mx-auto max-w-screen-2xl py-16 px-8 md:px-24 [@media(min-height:800px)]:min-h-[calc(100dvh-128px)]">
25+
<main
26+
class="mx-auto max-w-(--breakpoint-2xl) py-16 px-8 md:px-24 [@media(min-height:800px)]:min-h-[calc(100dvh-128px)]"
27+
>
2628
<h1 class="dark:text-white text-5xl md:text-6xl font-extrabold md:pt-16">Welcome to Juno</h1>
2729

2830
<div class="w-full max-w-2xl mt-8 grid grid-cols-2 gap-8">

0 commit comments

Comments
 (0)