Skip to content

Commit 2c68d19

Browse files
Merge pull request #10 from foundersandcoders:tailwind
Setup Tailwind CSS v4 with Custom Theme
2 parents 94e06f2 + 245cfd8 commit 2c68d19

File tree

4 files changed

+220
-5
lines changed

4 files changed

+220
-5
lines changed

package-lock.json

Lines changed: 191 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,27 @@
2727
"@tailwindcss/vite": "^4.0.0",
2828
"@testing-library/jest-dom": "^6.6.3",
2929
"@testing-library/svelte": "^5.2.8",
30+
"autoprefixer": "^10.4.21",
3031
"eslint": "^9.18.0",
3132
"eslint-config-prettier": "^10.0.1",
3233
"eslint-plugin-svelte": "^3.0.0",
3334
"globals": "^16.0.0",
3435
"jsdom": "^26.0.0",
36+
"postcss": "^8.5.4",
3537
"prettier": "^3.4.2",
3638
"prettier-plugin-svelte": "^3.3.3",
3739
"prettier-plugin-tailwindcss": "^0.6.11",
3840
"supabase": "^2.24.3",
3941
"svelte": "^5.0.0",
4042
"svelte-check": "^4.0.0",
41-
"tailwindcss": "^4.0.0",
43+
"tailwindcss": "^4.1.8",
4244
"typescript": "^5.0.0",
4345
"typescript-eslint": "^8.20.0",
4446
"vite": "^6.2.6",
4547
"vitest": "^3.0.0"
4648
},
4749
"dependencies": {
50+
"@fontsource/metropolis": "^5.2.5",
4851
"@supabase/supabase-js": "^2.49.8",
4952
"dotenv": "^16.5.0"
5053
}

src/app.css

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
@import 'tailwindcss';
2-
@plugin '@tailwindcss/forms';
3-
@plugin '@tailwindcss/typography';
2+
@import '@fontsource/metropolis';
3+
4+
@theme {
5+
--pink: #d600a8;
6+
--black: #000000;
7+
--white: #ffffff;
8+
--light-pink: #ff2ed2;
9+
--teal: #00a7a8;
10+
--yellow: #ffcb00;
11+
--orange: #ec5d2a;
12+
--green: #29e2a3;
13+
--purple: #7900d6;
14+
--bright-blue: #2235e2;
15+
--dark-purple: #4d1b9b;
16+
--font-family-sans: Metropolis, Arial;
17+
}
18+
19+
body {
20+
background-color: var(--white);
21+
color: var(--black);
22+
font-family: var(--font-family-sans);
23+
}

src/routes/+page.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
<h1>Welcome to SvelteKit</h1>
2-
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
2+
<p>
3+
Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation
4+
</p>

0 commit comments

Comments
 (0)